BBS:      TELESC.NET.BR
Assunto:  src/sbbs3/sftp.cpp src/sftp/sftp.h sftp_client.c sftp_common.c sftp_se
De:       Deuc¨
Data:     Sat, 25 Apr 2026 15:36:08 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/1c0786d644bf61f0d8f695a4
Modified Files:
	src/sbbs3/sftp.cpp src/sftp/sftp.h sftp_client.c sftp_common.c sftp_server.c src/syncterm/sftp_browser.c
Log Message:
sftp: add pubdir@syncterm.net extension; sbbs3 advertises /files

Server-to-client one-shot string carried in the SFTP VERSION
extension list.  Client advertises name/"1" in INIT; server replies
name/ in VERSION when state->pubdir is set.  Path is captured
into the client's private state and exposed via sftpc_get_pubdir().

The asymmetric data field is spec-legal (extension-data is opaque
bytes per draft-ietf-secsh-filexfer-02) but doesn't fit the existing
table-driven negotiation, so the server masks SFTP_EXT_PUBDIR off
the standard append_extensions() emit and appends name+path manually,
and the client recognises the entry by name and captures the data
explicitly (extension_match() can't fire when the data is the path).

sbbs3/sftp.cpp sets pubdir = SLASH_FILES so SFTP clients land in the
public filebase root.  syncterm's SFTP browser now prefers the
advertised pubdir as its initial cwd, falling back to realpath(".")
then "/" for servers that don't offer the extension.

Co-Authored-By: Claude Opus 4.7 (1M context) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]