Commit Graph
11 Commits
Author SHA1 Message Date
Claude 58fa88f7ea DORINFO1.DEF, and drop files as Synchronet writes them
dropfile = dorinfo1.def writes RBBS's DORINFO1.DEF (QuickBBS,
RemoteAccess): 13 lines in upper case, the names split at their first
space, the FOSSIL flag last; dorinfo#.def names it by the node,
DORINFO1.DEF to DORINFOF.DEF (max_nodes 15 at most).

The defaults follow Synchronet's (and its wiki's formats): DOOR32.SYS's
comm type 0 and handle -1 for a door on stdin and stdout, as modemmenu
runs them (was 2 and 0); the rate is the DTE rate, 38400, in every file
(doors built on DMlib refuse a modem's 26400), or rate = connect for
the modems'.  [dropfile] fossil and four_digit_years (MBSE's MM/DD/YYYY
option); an item's door_sys_lines = 31 writes the old DOOR.SYS with the
rest blank, dropfile_lowercase = yes lower-case names for Linux doors.
{dropfile} and MODEM_DROPFILE are the first file's path (Synchronet's
%f).  DOOR.SYS's daily limits are no longer 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 21:22:26 +00:00
Claude 56e6c6c086 Drop files for doors; the time left to programs, servers and menus
An exec item with dropfile = door32.sys door.sys writes DOOR32.SYS (11
lines) and DOOR.SYS (the 52-line GAP format) before its program starts
and removes them after: the user, the rate, the caller ID, the security
level ([dropfile] security, or the item's), the time left (minutes, and
seconds in DOOR.SYS), the emulation and the node.  Each door run takes
the first free node of max_nodes (a lock in state_dir/nodes, held while
it runs), each user keeps a number given once (state_dir/usernumbers).
The files go in dropfile_dir ({node} in it) or a new directory; commands
get {node}, {dropfile_dir}, MODEM_NODE and MODEM_DROPFILE_DIR.  The
password is not written.  [dropfile] has the BBS's name, the sysop and
the comm type, handle and port.

MODEM_SECONDS_LEFT joins MODEM_TIME_LEFT ({seconds_left}) in the
environment, the session file and the header.  A modemmenu -serve keeps
the header's time left as a limit of its own, so that going from one
menu to another gives no new allowance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 21:11:19 +00:00
Claude 4ae3891da8 time_warning takes several times: 5m 1m warns at both
Each of time_warning's times (the longest first, each once; a plain
number is seconds; 0 or none for none) writes time_warning_message on
the line while a selection runs; a selection started with less time
left gets the warnings still ahead.  The message has {seconds_left}
besides {time_left}.  One time, 2m, stays the default; the sample uses
5m 1m.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 20:41:56 +00:00
Claude da20bbd4ae LDAP groups, AD password changes, the time warning, the last callers
- LDAP groups for the items' groups =: with [ldap] group_base, a group
  is an entry there that group_filter finds (groupOfNames,
  groupOfUniqueNames and posixGroup by default), searched as
  search_bind_dn or as the caller; each answer kept for the call.
- [ldap] password_change = ad: mode = passwd changes an Active
  Directory password (unicodePwd's old value deleted, the new one
  added, quoted UTF-16LE), AD having no Password Modify.
- time_warning (2m) before the time limit, time_warning_message is
  written on the line in the middle of a running selection, unless the
  item says time_warning = no (the sample's PPP does).
- mode = callers: the last callers (time, user, rate; no caller ID),
  each login recorded in state_dir/callers (the latest 200) when there
  is such an item.
- The sample's end has items to copy: ZMODEM uploads (rz -b -R -E),
  a Kermit server (kermit -Y -x), lynx -anonymous, mutt, tin, irssi,
  Gopher and the last callers; it loads with all of them on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 19:51:33 +00:00
Claude afbc528dbe The auth socket: the BBS's other logins ask modemmenu's backends
From claude/beautiful-pasteur-oz81no (af30cbd), brought onto this
branch without the build output it had committed (pbx-modem, 15 MB, now
in .gitignore).

[authd] listen: a unix socket where a program on this machine (the BBS)
asks modemmenu's backends (file, ldap, sql, system) for a user's
password, so that telnet, SSH and web logins there take the same one.
One JSON line each way: {"user","password"} -> {"ok","auth"} or
{"ok": false, "error": "denied"}.  The backends are asked as at the
login prompt, user_pattern kept, a refusal fail_delay late.

Who may ask: socket_mode (none for others: refused), socket_group, and
allow_users (the peer's uid, SO_PEERCRED); TCP is refused.  -serve
answers it with its sessions; -authd alone
(modemmenu-authd.service.sample).

With this branch's features: settings carry both [authd] and the access
sections; a signup's locked account is refused on the socket too (now
tested), and a password changed from the menu holds there at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 02:34:28 +00:00
Claude 329cf02304 Callers change their passwords: mode = passwd
A built-in item: the current password (checked against the backends
again, which finds the one that holds the account), then the new one
twice (min_password, not the current one, three tries).  The password
changes where the account is:

- file: the user's line rewritten in place under the lock signups take,
  a note after the hash kept; bcrypt, or text with hash = plain
- sql: update_query with update_args (user, password, old_password) and
  update_hash (bcrypt, or none for a query that hashes it)
- ldap: Password Modify (RFC 3062) bound as the user, the server's own
  policy and hashing applying
- system: PAM's password stack; its messages (a quality module's
  reasons) go to the caller

A refused password leaves the old one; the selections after a change
get the new one.  The PAM sample has the password stack, and says that
pam_unix applies no quality checks for root (pam_pwquality with
enforce_for_root does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 02:30:28 +00:00
Claude 98755b757b Who sees what, time limits, guests and signup, caller ID rules, comments
Items take users, groups ([groups], or the system's for auth = system),
min_baud, callerids and guest; a caller neither sees nor can choose an
item they may not use.

time_limit limits a call and daily_limit a user's calls in a day (kept
in state_dir/usage under a lock); a selection is hung up at the limit,
and {time_left} / MODEM_TIME_LEFT tell what is left.

[guest] logs in by name without a password, to the guest = yes items
for its own time_limit.  [signup] adds new accounts to the users file
with a bcrypt hash, locked (user:!hash) until the sysop unlocks them
unless pending = no; the file backend refuses locked accounts.

[callerid] allow, deny and anonymous decide which calls the line takes;
[number PATTERN] sections deny a number, log it in as a user, or start
an item at once.

Comments may follow a value after a space; \; and \# escape them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-12 11:37:10 +00:00
Claude a5a55575af Unix sockets: modemmenu -serve, and items that connect to one
modemmenu -serve listens on [server] listen, a unix socket (or
tcp:host:port), for app_dmodem's mode = unix profiles: each connection
gets a session of its own, modemmenu on a new pty as mode = exec would
give it, so pppd, shells and ^C work the same.  A socket has no
environment: the call's details come first as a header, NAME=value
lines and an empty line (app_dmodem's header = yes).  socket_mode and
socket_group decide who may connect, max_sessions caps them, SIGTERM
hangs them all up and removes the socket.

Menu items reach other menu applications on unix sockets: mode = unix
(raw), or a path on tcp, telnet and rlogin items, and header = yes sends
the session ahead.  A modemmenu -serve with trust_user takes the user of
such a header as logged in, so a caller moves from one menu to another
without a second login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 16:25:46 +00:00
Claude f912b979ac System accounts by PAM only; message of the day; menu choices as words
auth = system is now PAM alone (pam_service): the /etc/shadow reader and
its yescrypt and crypt dependencies are gone.  The uid, root and group
rules stay, by the name service.

motd and motd_file (read at each login) show after the welcome, before
the menu.

The menu reads a line: an item's key (now one or more characters), its
name or an alias selects it, in any case (p, ppp, dialup); ? shows the
menu again, an unknown choice says so.  [menu] hangup takes several
words (G goodbye bye logoff); hotkeys = yes keeps one-key selection for
one-character keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 03:20:57 +00:00
Claude 9a407f269e Authentication by the system's accounts: /etc/shadow or PAM
auth = system checks the caller against the machine's own accounts.
method = shadow reads /etc/passwd and /etc/shadow and verifies their
crypt hashes in Go (yescrypt, SHA-512, SHA-256, MD5, bcrypt), refusing
locked accounts and expired accounts or passwords.  method = pam runs a
PAM service's auth and account stacks (sssd, Kerberos, anything PAM
does); it needs a build with -tags pam, which make picks when libpam's
headers are installed, so a plain go build stays free of C.  Accounts
below min_uid and root (unless allow_root) are not let in, and groups
limits logins to members.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 00:47:19 +00:00
Claude f194490fa3 modemmenu: a login and menu for dial-up callers
A Go program that D-Modem-RE's app_dmodem runs as a mode = exec profile
on the caller's line: it asks for a user name and password, checks them
with a text file, LDAP (bind as the user, directly or after a search) or
an SQL database (MySQL/MariaDB, PostgreSQL, SQLite), then offers a menu
of a BBS, PPP and a shell.  The selection gets the user name, password,
the backend that accepted them, the dialed number, caller ID, connect
rate and the connection's date and time: as MODEM_* in its environment,
as shell-quoted {placeholders} in its command, in an optional 0600
session file, in the rlogin handshake (the way BBSs log a caller in), or
sent after connecting to a raw TCP or telnet server.

Moved here from D-Modem-RE's modemmenu/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 00:34:46 +00:00