mirror of
https://github.com/D-Modem/login.git
synced 2026-11-28 12:28:07 -08:00
dmodem-login reads DMODEM_MODULATION, DMODEM_PROTOCOL and
DMODEM_COMPRESSION from D-Modem (and the same keys from a session
header). New placeholders: {modulation}, {protocol}, {compression},
{link} and {connection}. The default connect message is now
"Connected at {connection}.", for example
"Connected at 33600 bit/s (V.34, LAPM/V.42bis).". Without the new
values, {connection} is the same as {speed}.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRuPnyTxjwaHSUozaW
81 lines
4.2 KiB
Markdown
81 lines
4.2 KiB
Markdown
# Tests
|
|
|
|
|
|
`make test` does the checks that follow.
|
|
|
|
- It checks the password schemes, the file and SQLite backends, the
|
|
menu choices and the telnet client.
|
|
- It runs dmodem-login on a pty, as app_dmodem does. On the pty, it tests
|
|
these items: a wrong login and a correct login, the message of the
|
|
day, choices by key, by name and by alias, an unknown choice and `?`,
|
|
an rlogin BBS and the return to the menu, a cooked shell, and the
|
|
environment and session file of an exec selection.
|
|
- It runs `dmodem-login -serve` on a unix socket. It tests these items: a
|
|
session from an app_dmodem header (on a different pty), a caller who
|
|
hangs up, a transfer of a logged-in caller from a different dmodem-login
|
|
through a `mode = unix` item, and `SIGTERM`.
|
|
- It tests drop files line by line in all three formats. The tests
|
|
include the defaults of Synchronet, the other settings, the 31-line
|
|
`DOOR.SYS`, and names that are split for `DORINFO1.DEF`. It also tests
|
|
drop files on a call: the files, their names, the node, the
|
|
environment and the removal of the files after the call.
|
|
- Calls test which items each caller can see (users, groups,
|
|
`min_baud`, caller ID). Calls also test a guest, signups (logged in
|
|
immediately, and pending), refused numbers and known numbers. They
|
|
also test a selection that dmodem-login hangs up at the daily limit, and
|
|
the next call of that day, which dmodem-login refuses.
|
|
- It tests password changes in the users file and in SQLite. In the
|
|
users file, the other lines and notes must stay. On a call, it tests a
|
|
wrong current password, the rules for the new password, the change,
|
|
the next login with the new password, and a guest.
|
|
- It tests the auth socket: correct and wrong passwords, unknown,
|
|
malformed and locked users, `allow_users` and its settings.
|
|
- It tests AutoPPP with the real `dmodem-login.so`. A stand-in for pppd
|
|
loads the plugin ([pppd/test/host.c](../pppd/test/host.c)). The
|
|
stand-in exports the same items that pppd exports to plugins. This
|
|
test must have a C compiler and `ppp-dev`. The test examines these
|
|
items:
|
|
- PPP frames, which dmodem-login must tell apart from names.
|
|
- Correct and wrong PAP logins.
|
|
- `maxconnect` from the time limit.
|
|
- The access item, `attempts`, and one login for each call.
|
|
- On a call, a frame from a dialer at the login prompt. The frame must
|
|
get to the pppd plugin through the socket of the call.
|
|
|
|
A real pppd must have a kernel with PPP (`ppp_generic`).
|
|
- It tests the time warnings on a call. There must be two warnings, with
|
|
the longer warning first. With `time_warning = no`, there must be no
|
|
warning.
|
|
- It tests the list of the last callers on two calls. The list keeps a
|
|
maximum of 200 callers, shows the newest caller first and shows no
|
|
caller ID.
|
|
- It tests the password encoding of Active Directory.
|
|
- It tests the connect rate as `{speed}`: the same rate in the two
|
|
directions, different rates, and an unknown rate. It also tests the
|
|
connect rate on calls: after the banner, removed when there is no
|
|
rate, its own text, and disabled.
|
|
- It tests the modulation, the error correction and the compression as
|
|
`{modulation}`, `{link}` and `{connection}`: the names of D-Modem, the
|
|
names for persons, no error correction and no names. It also tests the
|
|
connect message on calls with `DMODEM_MODULATION`, `DMODEM_PROTOCOL`
|
|
and `DMODEM_COMPRESSION`.
|
|
- It tests the uid, root and group rules of the system backend, with a
|
|
replacement for PAM.
|
|
|
|
Two more tests run if you give them their servers:
|
|
|
|
- `DMODEM_LOGIN_TEST_PAM=user:password make test`, as root with
|
|
`/etc/pam.d/dmodem-login`: this tests PAM against a real account. It
|
|
changes the password of the account and then changes it back. The
|
|
service must have a password stack.
|
|
- `DMODEM_LOGIN_TEST_LDAP=ldap://host:port make test`: this tests the LDAP
|
|
backend against a server that has
|
|
`uid=lduser,ou=people,dc=example,dc=com` (password `ldpass`). It
|
|
changes that password and then changes it back. The server must let
|
|
users write their own `userPassword`. If
|
|
`ou=groups,dc=example,dc=com` contains the groups that follow, the
|
|
test also examines LDAP groups:
|
|
- `cn=sysops` (`groupOfNames`, `member` lduser)
|
|
- `cn=dialup` (`posixGroup`, `memberUid` lduser)
|
|
- `cn=other` (without lduser)
|