A signup made the account in the users file only. Now it makes the
account in each backend of [general] auth that is set up to make
accounts: the users file, SQL ([sql] insert_query), LDAP ([ldap] add_dn,
added as add_bind_dn, the password set by Password Modify or unicodePwd
for AD) and system accounts ([system] create_command, with a useradd
sample script). [signup] backends limits the list.
Before the account is made, each backend checks that the name is free.
If one backend fails, the accounts already made are taken back
(delete_query, entry delete, remove_command). With pending = yes, each
backend must lock the account, or dmodem-login does not start.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRfuh3h6uNuHtaugux
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
make install now makes dmodem-login.service, dmodem-login-authd.service
and dmodem-login-ldapd.service from their samples, with the paths of
BINDIR and CONF_DIR, and puts them in SYSTEMD_UNIT_DIR
(/etc/systemd/system). It keeps a unit that is already there and
enables none. install-freepbx and install-dialup use SYSTEMD_UNIT_DIR
too. docs/running.md gives the steps after make install.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRV8YPyMUdSM1QgsczH
dmodem-login no longer reads modemmenu's default paths (the
configuration, the users file, the state directory and the PAM
service), and the pppd plugin no longer accepts modemmenu-socket.
docs/rename.md now says what to rename on an old installation. The bbs
CI job no longer rewrites the old module path, because bbs now uses
github.com/D-Modem/login.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTD8BSptdpaUWGcs65
make install and install-freepbx no longer put modemmenu and
modemmenu.so links: an old installation changes its app_dmodem profiles
and pppd options to dmodem-login (docs/rename.md says so).
COMMERCIAL-LICENSE.md and CONTRIBUTING.md name dmodem-login and
D-Modem/login.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTD8BSptdpaUWGcs65
The server can say that the lines are busy and close the connection
before the test writes its header, and the write fails (broken pipe, as
in CI). What the server said was read all the same: expect it rather
than fail on the write.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTD8BSptdpaUWGcs65
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
[ldapd] serves a read-only LDAPv3 directory from the same backends as
the login prompt, so that other programs (the BBS, a wiki, mail, a PBX)
use the same users and passwords as the dial-up line.
- uid=<user>,ou=people,<base_dn> for the users file, the members of
[groups] and system accounts named by a search; cn=<group>,ou=groups
from [groups], with member, memberUid and memberOf
- simple bind as a user (DN or bare name) or a service account whose
bind_password is a hash; no password is ever in an entry
- search (all filters but extensible match), compare, StartTLS, ldaps,
Who am I? (RFC 4532), Password Modify (RFC 3062, old password
required, in the backend that holds the account), paged results
- require_tls (default yes) except on unix sockets and loopback;
anonymous_search, user_search, fail_delay, max_clients, idle_timeout,
size_limit; add, delete and modify are refused
- run by -serve, or alone by -ldapd (modemmenu-ldapd.service.sample)
- docs/ldap-provider.md in Simplified Technical English, the sample,
the reference and the setup screens
Tested with go-ldap and with OpenLDAP's ldapsearch, ldapwhoami and
ldappasswd (StartTLS, ldaps, paging).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTD8BSptdpaUWGcs65
The server may hang up on a connection it is too busy for before the
test writes its header: a broken pipe, which is the busy answer, not a
failure. The loop that waits for the line to be free tries again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVGabTrMWBpbnD6HKF
As bbs config got in D-Modem/bbs#57:
- Every section and key has a description of what it does for the
sysop (setupdesc.go); TestEverySettingDescribed keeps one for each
key the sample has. F1 adds the sample's notes and the choices.
- Keys are picked from lists with a note per value: closed lists (mode,
tty, after, charset, driver, hash...), suggestions with "Type another
value…", and checkboxes for lists of several (auth, [menu] items,
dropfile, users, groups, aol networks, ppp_pool dns). The values come
from the file and the machine: the items, the users file, [groups],
/etc/passwd and /etc/group, resolv.conf, the sockets in /run.
- An item's key list says which letters are free and which are taken by
another item or the hangup; listen addresses say when the other
section uses them.
- "Add a menu item" starts from one of the sample's items (or an empty
one), with a free key if the sample's is taken.
- tui.ChooseMulti: a list of checkboxes.
- The sample gains [number] deny and [sql] timeout, which the code read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVGabTrMWBpbnD6HKF
The setup on a caller's line ended after idle_timeout, and modemmenu
-setup on the console quit after a minute in an open dialog or
pull-down. The tui Desk now takes Idle < 0 as no limit, and a Deadline
that still ends a wait; the setup uses both, so only a hangup or the
session's time_limit ends it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTXXCusbxh6h6Btenm
app_dmodem's DMODEM_PEER (the address a call came from by SIP), from the
environment or the session header, is now {peer} and MODEM_PEER: in the
selection's environment and session file, and in the header written to a
BBS behind the menu, which places a caller without a caller ID by it
(D-Modem/bbs#45, D-Modem/D-Modem#108).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSVXNfvCFNooYkqeMp
The menu comes up full screen on a terminal that can have it (ANSI, or a
VT that said what it is, 40x14 at least): the items in a window on a
blue desk, a bar moved with the cursor keys, an item's key starting it
at once, the welcome at the top of the window, the motd in a box, the
user, rate, clock and minutes left on the bars. Others get the menu of
lines; the login stays lines, so AutoPPP and the AOL client sniffing
are as they were. [menu] fullscreen = auto|no, item help =.
modemmenu -setup changes modemmenu.conf on full screens in the style of
the 1990s BBS setup programs (the bbs's setup screens, ported): pull-down
menus, cascading windows, the sample's help of each key, values typed in
a box or picked from a list. Saving checks the file first and keeps its
comments and order. An [item] of mode = setup (users or groups needed)
gives it to a sysop who calls in.
- internal/tui: the screen buffer and its diff rendering (from bbs
textui/desk.go), UTF-8, code page 437, the VT line set and ASCII,
keys, windows, pull-downs and dialogs
- internal/confedit: changes to the file by line, comments kept
- internal/confdoc: the sample's help, from tools/confref (shared)
- term: a UTF-8 probe for ANSI terminals; [terminal] charset
- below 9600 bit/s the desk is plain blue, cleared in a few bytes
- the sample: comments for keys that took a neighbour's help
- tests: the line menu's tests ask for fullscreen = no; one handoff
test waits for the server's last log line
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUujUBmci66AZkngmh
The classic AOL client's CCL script answers a network's prompts before it
speaks P3. With [aol] enabled, modemmenu plays AOLnet (UQKT1, aol,
CONNECTED), SprintNet (@D, TERMINAL=, D1, @, par? 11, C address,
CONNECTED) or Tymnet (A, LOG IN:, +, CALL CONNECTED), as AOL 3.0's own
AOLNET.CCL, SPRINT.CCL and TYMNET.CCL wait for them, or takes P3 at
once, then pipes the line to [aol] host (the BBS's AOL front end).
Claude-Session: https://claude.ai/code/session_01B82eRRm1WrfJdB863kw36V
Signed-off-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
A header that comes with a descriptor (SCM_RIGHTS; app_dmodem's
handoff = yes passes the modem's pty terminal) gives -serve the line
itself: the session runs on that terminal as its controlling tty, so
the menu, shells and pppd are on the modem's line and nothing is
copied. The connection then only marks the session's life: the
caller gone closes it (SIGHUP to the session), the session ending
closes it (app_dmodem hangs up).
An item with handoff = yes (mode = unix, header = yes) hands the
session's line to its server the same way, the item's send and what
the menu read and did not use right after the header, and has it back
when the server closes the connection (after = menu shows the menu
again). The time limit still holds: at the deadline the menu closes
the connection.
Tests: eight callers at once on handed-over lines, each session on a
terminal, each handed on to a BBS that takes the terminal and gives it
back; PPP on a handed-over line ended at its time limit, the call hung
up; handoff without mode = unix and header = yes refused.
Claude-Session: https://claude.ai/code/session_01B82eRRxseyEuLRFbFaBoX3
Co-authored-by: Claude <noreply@anthropic.com>
TestServeManyCallers: eight callers at once on -serve's unix socket,
each with its own header, login and menu, each handed to a BBS on a
unix socket by an item (mode = unix, header = yes): eight connections
to the BBS, all there together, each with its own user, and no caller
sees another's bytes. TestServeBusy: past max_sessions a caller hears
the lines are busy, and a line that hangs up is free again.
running.md says how the hops work: a connection per caller at each
one, the bytes copied, no descriptor passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRxseyEuLRFbFaBoX3
- the samples' subnet moves to 100.77.0.0/24, in RFC 6598's shared
address space, which no home or office LAN uses (Tailscale's caveat
noted)
- an empty ALLOW_CIDRS (the default) or port list left a stray brace in
the nftables rules, so modemmenu-dialup up failed: the set's elements
line is now built apart
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVTwDhoXdaYHRwQ4BT
- [ppp_pool]: each PPP caller gets its own address of a range
({ppp_local}, {ppp_remote}, {ppp_dns}, {ppp_dns2} and MODEM_PPP_*),
as flock'd lock files in state_dir/ppp-pool shared by every modemmenu
and -serve session, so several lines can run PPP at once. The samples
move to 10.77.0.0/24 with the pool.
- dialup/: modemmenu-dialup puts the callers' links in a VRF of their
own, egress by a VLAN, the host's uplink (NAT) or none, with an
nftables firewall: only the listed service ports of the host, no
private range (host LANs, other callers) unless ALLOW_CIDRS opens it.
pppd's ip-up.d/ip-down.d hooks attach each link.
- modemmenu-dns: dnsmasq in the VRF on 10.77.0.1, with overrides from
/etc/modemmenu/dns.d/*.conf (AIM/ICQ, AOL, MSN, Yahoo names ready).
- make install-dialup, docs/dialup-network.md; confref reads section
names with underscores.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVTwDhoXdaYHRwQ4BT