- Jan 21, 2025
-
-
Rob Swindell authored
No change in functionality, just code comprehension
-
- Jan 16, 2025
-
-
Rob Swindell authored
-
- Jan 15, 2025
-
-
Rob Swindell authored
This allows a server that's being terminated to stop the port-bind delay/retry loops and terminate more quickly in cases of port binding failures.
-
Rob Swindell authored
Log the error string if it's non-blank, as a warning (e.g. unrecognized text.ini text.dat string ID). Reduce the number of logged messages when config load failure happens. Commonize the load_cfg() error log messages.
-
- Jan 14, 2025
-
-
Rob Swindell authored
uncrustify nl_split_if_one_liner setting
-
Rob Swindell authored
... using uncrustify mod_paren_on_return config
-
Rob Swindell authored
White-space changes only, exception being the rare insertion of NL before closing brace (couldn't find the option to disable that behavior). I excluded some header files (e.g. sbbs.h) since uncrustify seemed to be doing more harm than good there. I might just end up applying different set of rules to .h files.
-
- Jan 11, 2025
-
-
Rob Swindell authored
This fixes issue #748
-
Rob Swindell authored
e.g. [can|is]_subject_something() is now named subject_[can|is]_something() No functional change.
-
- Jan 08, 2025
-
-
Rob Swindell authored
As an alternative to directory aliases configured in ftpalias.cfg and/or web_alias.ini, a sysop can specify a shortcut (virtual directory name) per directory in SCFG->File Areas. These shortcuts will appears as top/root level directories in the FTP and Web servers for quick user access to important directories. The advantages (over ftpalias.cfg / web_alias.ini) are: - one place to configure - FILE_FTP_PATH and FILE_WEB_PATH @-codes will use the shortcut (usually a shorter, preferred virtual path to the directory) * New JS file_area.dir[].vshortcut property
-
- Dec 02, 2024
-
-
Rob Swindell authored
-
- Nov 18, 2024
-
-
Rob Swindell authored
Can't used designated initializers in fmutex_init() because this file is still built with C++Builder6.
-
Rob Swindell authored
For some reason, MSVC was initializing the time_t (second element of the struct) to -1, not the int fd (the first element), which was initialized to 0. Weird.
-
Rob Swindell authored
The auto-remove param was only needed for fmutex(), which immediately closes (and thus don't want auto-removal), so create an internal function that's used by both fmutex() and fmutex_open().
-
Rob Swindell authored
This is needed for *nix where normal (i.e. not Samba-mount) file behavior requires that we manually unlink() the file, but not until just before closing it. So we have to keep track of the file name and the 'auto_remove' desire of the caller. This is not necessary when the file is on a Linux-smbfs, but we need to work as expected on normal/local *nix file systems too. This solves atomic lock file removal for *nix, but does not gaurantee lock file cleanup upon ungraceful process termination (e.g. crash). At least in this particular case, Windows beats UNIX.
-
- Nov 17, 2024
-
-
Rob Swindell authored
-
Rob Swindell authored
-
Rob Swindell authored
Add the errno value to help root-cause. We really should be using safe_strerror() everywhere.
-
- Nov 16, 2024
-
-
Rob Swindell authored
This appears to be the only way to 100% provide mutual exclusivity between Windows and Linux client sharing a Samba file system. Also, make fmutex_close() take a pointer to the file descriptor so that we can better manage the resource (i.e. don't close a descriptor that's already been closed and possibly valid in another thread).
-
- Nov 15, 2024
-
-
Rob Swindell authored
Vertrauen's FTP server gets abused by QWKnet logins sometimes and handling the race conditions around QWK packet creation attempts is silly - there's no legit reason why a QWKnet account needs to be logged-in multiple times concurrently to the hub's FTP server, so reject the subsequent logins even when they're on different hosts (as is the case with Vertrauen). As part of this change: - fmutex() now takes an new time_t* argument to (optionally) store the time of the mutex file for helping logging (locked since when?). - time_as_hhmm() created to format a string as either HH:MM or HH:MM[a|p] (depending on system configuration for 12 or 24 hour time formatting). - renamed the old hhmmtostr ()to tm_as_hhmm() (since it takes a struct tm arg) and have it return a non-padded string (useful in more situations without requiring truncation) when the sysop prefers 24-hour time.
-
- Nov 04, 2024
-
-
Rob Swindell authored
Trying to get to the bottom of user.tab corruption (issue #797).
-
- Oct 23, 2024
-
-
Rob Swindell authored
There are still places where it could be logged in <> (if username is not yet known).
-
- Oct 22, 2024
-
-
Deucе authored
receive_thread() needs to use the control session correctly for TLS connections.
-
Rob Swindell authored
Ideally, a sysop would never need to disable FTPS support, but as a trouble shooting measure, it can be helpful.
-
- Jul 12, 2024
-
-
Rob Swindell authored
We don't log highwater valeus of 1, though those are published to MQTT. Not dealing with 'services' server yet, cause that's kind of tricky with the sysop likely wanting to know per-service stats (served counter, highwater mark, etc.)
-
- May 04, 2024
-
-
Rob Swindell authored
Fix observed crash when shutting down services server where the client_t protocol was pointing to a freed service's protocol description string. This was the last pointer in client_t and should resolve the last race conditions (memory ownership issues) with its data members. This also resolves a small memory leak in getnodeclient() where the last client "gotten" would have its heap-duplicated protocol string leaked.
-
- Mar 22, 2024
-
-
Rob Swindell authored
-
- Mar 21, 2024
-
-
Rob Swindell authored
This allows each call to ftp_remote() to specify the log level for any remove failure. All others file-removal failures will continue to log at ERROR level. I get this particular (harmless) error a lot, so just reducing to warning: ftp ... !ERROR 13 (Permission denied) (line 860) removing file: path/to/*.qwk
-
- Mar 07, 2024
-
-
Rob Swindell authored
The Git commit date/time is more useful information.
-
- Feb 14, 2024
-
-
Rob Swindell authored
Commit 75c5c9e5 was initially to address server termination (sisue #236), but expanded in scope to include server recycling (e.g. due to semaphore/config file touch) and that turns out to not be what most sysops want. If you want an immediate/ungraceful recycle, do a restart (shutdown/stop and then start) instead. Immediate/ungraceful server shutdown/termination is still in effect however. No change to the "server pause" feature either, so combining pause with recycle would be effective to prevent *new* client connections while waiting for existing clients to disconnect and allow a recycle to happen.
-
- Feb 07, 2024
-
-
Deucе authored
value that's not an off_t as one.
-
- Jan 22, 2024
-
-
Rob Swindell authored
These should've been static to begin with, like the other servers. Explains why FTP error message are with "term" as the server.
-
- Jan 21, 2024
- Jan 20, 2024
-
-
Deucе authored
Use cryptDestroySession() instead.
-
- Jan 16, 2024
-
-
Rob Swindell authored
Reported by Max (WESTLINE)... Introduced in commit 75c5c9e5, since we are now calling the set_state() callback periodically, and in sbbsctrl, it sets/resets the pause button checked (depressed) state in response to this callback (should it?), this was resetting the pause button checked/depressed state peridically (at the configured sem file check interval, default 2 seconds). The fix: if the new server state is the same as the previously set server state, don't call the set_state() callback. I considered this as a potential optimization when I first wrote that commit, but didn't see any obvious downside to calling the set_state() callback redundantly. Now that I see a downside, let's implement this saving/checking of the state to avoid redundant "set" calls.
-
- Jan 13, 2024
-
-
Rob Swindell authored
We have checks/loops/timeouts waiting for active clients to disconnect and child thread threads to terminate whenever shutting down or recycling already, so this should be safe. This pretty simple change fixes issue #236 (can't terminate server under heavy load). Also as part of this commit, introduced the ability to "pause" a server (prevent it from accepting new connections) with the ctrl/pause semaphore file or via the MQTT server/pause (and resume) topics. This feature is useful when debugging server issues where you don't necessarily want to fully shutdown/terminate the server, but don't want any new connections to be accepted (the listen backlog will fill up with incoming connections though). Unlike a server shutdown, a server pause can be "undone" via MQTT (by publishing a message to the "resume" topic). The "pause" semaphore file is just an "existence" semaphore file - its date/time stamp doesn't matter. If the file exists, the server will enter a paused state (and periodically log messages to that fact) until the semfile is deleted. This server pause feature is not the same as the pause button function in sbbsctrl, which just pauses server log output.
-
- Jan 10, 2024
-
-
Rob Swindell authored
Support was accidentally removed as part of commit 22e8d2e3, meaning the ftpalias.cfg wasn't used at all in responses to the MLSx commands as reported by Max (WESTLINE) using Total Commander, FileZilla and Directory opus. The traditional "LIST" commands still worked fine with ftpalias.cfg contents just fine. The reason this code was accidentally removed was due to the errant copy/pasted comparison with startup->html_index_file that did not belong here and made the block appear related to HTML index file generation. It was not. This was just a bug in the initial implementation of MLSx support in commit d4deb4b3. Also included in this commit: - Return the date/size of the user's QWK packet file, if it exists, in MLSx response. - send_mlsx_entry() won't report negative time_t values as file modify dates (flength returns -1 upon failure/file-not-found). - get_owner_name() returns the string, making it easier to use in function calls. There appears to still be some work to do to make the MLSx commands fully compliant with RFC 3659 (e.g. "mlst filename" from ftpalias.cfg should work but does not), but at least FileZilla displays ftpalias.cfg files and directories correctly now.
-
- Jan 09, 2024
-
-
Rob Swindell authored
-