• src/smblib/smbfile.c

    From rswindell@VERT to CVS commit on Sat Dec 29 13:14:00 2018
    src/smblib smbfile.c 1.12 1.13
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/tmp/cvs-serv20933

    Modified Files:
    smbfile.c
    Log Message:
    Fixed typo in comment.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Mar 19 11:52:00 2019
    src/smblib smbfile.c 1.13 1.14
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/home/rswindell/sbbs/src/smblib

    Modified Files:
    smbfile.c
    Log Message:
    Use DEFFILEMODE (which is user/group/other read/writeable by default on *nix) in smb_open*() when creating msgbase files.
    smblib wasn't using the same default file creation mode (permissions) as
    the rest of the Synchronet executables. smblib was creating msgbase files
    as user read/writeable *only* (no group or other permissions) - so the umask value for the group/other permissions flags had no effect on msgbase files created via smblib.
    This could lead to permissions issues for other users/groups on *nix systems trying to access (read or write) msgbases. No change for non-*nix systems.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Apr 13 20:08:50 2020
    src/smblib smbfile.c 1.16 1.17
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/tmp/cvs-serv25844

    Modified Files:
    smbfile.c
    Log Message:
    Don't retry/loop in smb_fread(), regardless of the errno value, if we're at the end of the file.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Feb 4 16:15:15 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/30391a1fae6fa5a725a276ef
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    Upon timeout opening a file, log the last errno value too

    It should be either EACCESS or EAGAIN, but still, could be useful to know.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wed May 12 17:07:14 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/cfee914fed60488a51a62dc5
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    Fix crash in smb_addfile_withlist() when passed a non-NULL empty list

    Don't allocate and memset a buffer of -1:
    #1 0x0000559222bc167f in strListCombine (list=0x559224220720, buf=0x559224226550 "", maxlen=18446744073709551615,
    delimit=0x559222bcce0a "\r\n") at str_list.c:447
    447 memset(buf, 0, maxlen);
    (gdb) print maxlen
    $1 = 18446744073709551615
    (gdb) up
    #2 0x0000559222ba3841 in smb_addfile_withlist (smb=0x7ffce63a7e90, file=0x7ffce63a5bc0, storage=1, extdesc=0x0,
    list=0x559224220720, path=0x7ffce63a6e80 "/xfer/loons/manhater.mp3") at smbfile.c:365
    365 strListCombine(list, content, size - 1, "\r\n");
    (gdb) print list
    $2 = (str_list_t) 0x559224220720
    (gdb) print list[0]
    $3 = 0x0

    Found/reported by plt via irc. Thanks!

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu May 13 14:57:59 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/34aeeb6d4b688a168058707a
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    smb_removefile() failed if filename length was > 64 chars

    And the "name not found" error text was wrong.

    ---
    þ 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 Sun Dec 24 21:51:36 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/43575170940c3ff3a9017eee
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    Reset import time (to current date/time) in smb_renewfile()

    Don't allow smb_removefile() to corrupt a filebase if passed an uninitialized (not fully load()'d) file_t*. Doesn't fix a bug, just some extra defensive programming here.

    Addressing problems reported by echicken

    ---
    þ 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 Tue Dec 26 16:04:06 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/46c0eb0de29bab7607bfb0ef
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    Fix CID 471656 in smb_addfile_withlist()

    No one's using this function currently (and may never).

    It was used back when I was putting archive contents in .ini format in the files' metadata (now auxdata).

    ---
    þ 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 Tue Sep 17 12:06:15 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/45363fee6f6d688671faeee0
    Modified Files:
    src/smblib/smbfile.c
    Log Message:
    NUL-terminate the SMB fileidxrec_t.name field, just in case

    The terminating NUL is actually part of the index record, but with file corruption, it's technically possible the NUL could be missing.
    Fixes CID 509552

    Use strnicmp() insted of stricmp() in smb_removefile()
    Fixes CID 509551

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