Commit Graph
5 Commits
Author SHA1 Message Date
Claude b253ce1549 Detect the caller's terminal: ANSI, VT, VT52, PETSCII and TN3270
Before the banner modemmenu asks the terminal what it is, in bbs-sec's
order: telnet's terminal type when [terminal] tn3270 is set (a 3270 is
handed to the tn3270 server), the cursor position for ANSI and its size,
ESC Z for a VT52, and DEC's, xterm's and SyncTERM's identification for
an ANSI terminal.  A terminal that is not ANSI may be a Commodore: the
login prompt watches for keys only a Commodore sends, and an all-capitals
name gets "PRESS DEL", as bbs-sec does; the menu then speaks PETSCII.

The result is {terminal}, {term}, {term_name}, {rows} and {cols}
(MODEM_* and TERM for exec items, the size set on the line), passed on
in the session header so a downstream menu does not ask again, and used
by [dropfile] emulation = auto (the new default).  Bytes that arrive
during the questions go back to the login; a PPP frame ends them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-18 03:33:16 +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 04f5562196 License: AGPL-3.0-only, with commercial licenses from Neo-Desktop
LICENSE is the GNU Affero General Public License, version 3 (gnu.org's
text); each source file names it (SPDX-License-Identifier:
AGPL-3.0-only) and Neo-Desktop as the copyright holder.

COMMERCIAL-LICENSE.md: for uses the AGPL does not allow, Neo-Desktop
grants commercial licenses on agreed terms; asked for by a GitHub issue.

CONTRIBUTING.md: contributions come with an agreement (Signed-off-by)
that licenses them to Neo-Desktop under the AGPL and other terms,
commercial ones included, so that they can be part of both.

The README has a License section, and says how a modified modemmenu
offers callers its source (the AGPL's section 13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-15 20:09:02 +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 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