mirror of
https://github.com/D-Modem/login.git
synced 2026-11-28 20:38:06 -08:00
The program is dmodem-login (like dmodemd and dmodem-ari), the Go module github.com/D-Modem/login, the site d-modem.github.io/login. Its files, units, sockets, PAM service, pppd plugin, environment (DMODEM_LOGIN_*) and nftables tables follow. An old installation keeps working: - make install puts a modemmenu link to dmodem-login, and a modemmenu.so link to the plugin, which also takes its old modemmenu-socket option - the default configuration, users file, state_dir and PAM service fall back to modemmenu's when only those are there (config.Legacy) docs/rename.md (Simplified Technical English) lists the new names and what an old installation must change (the -serve socket, the units, the /etc/modemmenu files, the old nftables tables). CI's bbs job moves a bbs that still imports github.com/D-Modem/menu to the new path. The pppd plugin builds clean with -Wall -Wextra on GCC and Clang. COMMERCIAL-LICENSE.md and CONTRIBUTING.md (legal text) are not changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRTD8BSptdpaUWGcs65
76 lines
3.9 KiB
Markdown
76 lines
3.9 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 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)
|