• src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Saturday, November 16, 2024 12:22:59
    https://gitlab.synchro.net/main/sbbs/-/commit/8f2102a7f68f4c30d377722d
    Modified Files:
    src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
    Log Message:
    Leave the user/*.ftp lock file open for better protection

    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).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sunday, November 17, 2024 17:34:16
    https://gitlab.synchro.net/main/sbbs/-/commit/b7bd03313a6f8156f03c69a0
    Modified Files:
    src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
    Log Message:
    Have fmutex_open()/close() accept a fmutex_t* argument

    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sunday, November 17, 2024 17:47:50
    https://gitlab.synchro.net/main/sbbs/-/commit/1f37517ce697091d170e1b96
    Modified Files:
    src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
    Log Message:
    Simplify the fmutex_open() usage: always auto-remove when using open/close()

    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().

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, November 18, 2024 10:56:33
    https://gitlab.synchro.net/main/sbbs/-/commit/86433ba89bc7a723dcceaa9f
    Modified Files:
    src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
    Log Message:
    Simplify fmutex_open() signature even more, add fmutex_init()

    Can't used designated initializers in fmutex_init() because this file is still built with C++Builder6.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net