• src/sbbs3/userdat.c userdat.h

    From rswindell@VERT to CVS commit on Thu Oct 30 01:39:24 2014
    src/sbbs3 userdat.c 1.151 1.152 userdat.h 1.48 1.49
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1724

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Constify the SOCKADDR_IN arguments to login* functions.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Wed Aug 26 01:36:16 2015
    src/sbbs3 userdat.c 1.154 1.155 userdat.h 1.51 1.52
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv30155

    Modified Files:
    userdat.c userdat.h
    Log Message:
    The addr field of login_attempt_t is no longer just the binary address itself, but contains a full struct sockaddr. We no longer need a separate field for the address family.

    Also, when populating the addr member, simply memcpy() the whole addr, not
    the binary address part (derp).



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Tue Nov 24 08:28:01 2015
    src/sbbs3 userdat.c 1.158 1.159 userdat.h 1.53 1.54
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv3118

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Fix build issue: lower-case enum name to sync with smbdefs.h.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Mon Dec 7 01:16:05 2015
    Subject: src/sbbs3/userdat.c userdat.h
    @MSGID: <56654E55.32502.syncprog@vert.synchro.net>
    @TZ: 41e0
    src/sbbs3 userdat.c 1.163 1.164 userdat.h 1.56 1.57
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv12304

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Split getuserdat() into 3 functions:
    - openuserdat()
    - readuserdat()
    - parseuserdat()

    getuserdat() still exists and just calls those 3 functions. This allows other code (e.g. the control panel) to optimize iterative calls to getuserdat() by opening the file just once or even reading the entire contents at once and then parsing each user record from memory.

    Updated style of arguments in userdat.h (i.e. remove argument name if obvious from the type).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Wed Oct 5 23:35:29 2016
    src/sbbs3 userdat.c 1.169 1.170 userdat.h 1.59 1.60
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv21901

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Added is_user_online(): checks to see if the secified user is online (logged into a terminal server node)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Mon Nov 28 02:11:41 2016
    src/sbbs3 userdat.c 1.176 1.177 userdat.h 1.63 1.64
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23226

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Created function: is_host_exempt() which returns true if the passed IP address or hostname is listed in the ctrl/ipfilter_exempt.cfg file.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Thu Oct 12 02:11:58 2017
    src/sbbs3 userdat.c 1.181 1.182 userdat.h 1.65 1.66
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5737

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Fixed potential NULL-dereference in is_user_subop().
    Introduced closeuserdat().

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Mar 15 22:26:11 2018
    src/sbbs3 userdat.c 1.188 1.189 userdat.h 1.67 1.68
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv16649

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Added some functions to read/write to the data/user/*.ini files.
    I'm calling these "user properties", but that might change.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Nov 6 19:55:00 2018
    src/sbbs3 userdat.c 1.207 1.208 userdat.h 1.68 1.69
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    userdat.c userdat.h
    Log Message:
    user_get_property() changed to include a 'maxlen' argument so that every
    buffer passed to it doesn't have to be INI_MAX_VALUE_LEN in size.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu Feb 14 19:53:02 2019
    src/sbbs3 userdat.c 1.210 1.211 userdat.h 1.69 1.70
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv26144

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Created loginAttemptListCount().

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Aug 20 00:56:35 2019
    src/sbbs3 userdat.c 1.216 1.217 userdat.h 1.71 1.72
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28000

    Modified Files:
    userdat.c userdat.h
    Log Message:
    New function lookup_user(), a better version of the matchname() function
    from sbbsecho which uses a linked-list for the cached user list. Users are looked up by alias or real-name (alias is has higher precedence). The found user number is returned or 0 if not-found (or other error).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wed Sep 25 20:18:32 2019
    src/sbbs3 userdat.c 1.220 1.221 userdat.h 1.74 1.75
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    userdat.c userdat.h
    Log Message:
    Added support for custom/extended node status text.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Sat Nov 21 15:44:43 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/00c56b2ae95be5f939ebad68
    Modified Files:
    src/sbbs3/userdat.c userdat.h
    Log Message:
    Use a more-liberal username matching algorithm

    - Ignore all non-trailing non-alphanumeric characters when comparing a string against a user's name. Previously, spaces and dots and underscores were mostly-treated as equivalent and white-space was sometimes compressed for comparison purposes (if the user name contained both spaces and dots). This updated algo helps to insure that deliberate or accidental name collisions cannot be created but also aids usability (e.g. users can make some minor cosmetic adjustments to their user name and still be considered the "same user" for most comparison purposes).
    - Terminate the comparison string at an '@' (ignore everything after). This resolves the FAQ of why users can't login with "username@domain" and aides some other username/address matching algorithms (e.g. in the mailserver). '@'s are illegal characters for usernames already.

    Expose the new algorithm via new function matchusername().
    Use the algorithm in matchuser() and lookup_user().

    Unrelated: don't lower-case the 'localuser' part of email addresses in usermailaddr() - cosmetic only.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Dec 13 03:30:25 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/12a11b6bc4905c5be3946004
    Modified Files:
    src/sbbs3/userdat.c userdat.h
    Log Message:
    Add getnodeclient() to read a node's client.ini file

    One weird thing is that client_t:
    - has just a const char* for the protocol, so that's strdup/free'd here (consider making this a char array to simplify this API)
    - does not have a socket descriptor, so that value is returned
    - does not have local addr/port info
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Jan 1 17:28:31 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/cf12bc723bec48c9ea7d706d
    Modified Files:
    src/sbbs3/userdat.c userdat.h
    Log Message:
    New user API functions to determine directory access

    can_access/upload/download and is_operator
    similar to what we already had defined for sub-boards
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Apr 13 22:57:34 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/7db3b623bd115c096f4a261d
    Modified Files:
    src/sbbs3/userdat.c userdat.h
    Log Message:
    Refactor putuserrec()

    This started with a Coverity issue (CID 33230) which got me looking at this function and wondering: why is str2 being NUL-terminated here? Why is the length of str2 to be calculated on successive lines? What is with this (long)((long)((long)((long)) typecast?

    This was some of the oldest code in Synchronet (along with a lot of the other functions in this file). I tried to keep as much intact as possible while still improving the logic and readability.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (in GitKraken)@VERT to Git commit to main/sbbs/master on Sun Feb 19 15:26:00 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/dd38606e246a2a4e2179d407
    Modified Files:
    src/sbbs3/userdat.c userdat.h
    Log Message:
    find_login_id() will now return 0 if login ID is an invalid user number

    If login by number is supported and a client attempts login with an invalid usernumber, don't log an error, e.g.
    mail 3264 SMTPS [46.148.x.x] !ERROR -2 getting data on user (6123)

    But rather treat it as an invalid login attempt.

    Also change lastuser() and total_users() to return int instead of uint. 2 billion users should be plenty.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Wed Aug 9 18:28:43 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/efdbc232d655709c4b3551dc
    Modified Files:
    src/sbbs3/userdat.c userdat.h
    Log Message:
    Add some helper functions for modifying node records in node.dab, atomically

    These should probably be moved (along with other node functions in this file) to nodedat.* some day.
    ---
    þ 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 1 15:58:21 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/44710259f11cc8837d1735f5
    Modified Files:
    src/sbbs3/userdat.c userdat.h
    Log Message:
    Unify the int return values of userdat.c functions

    These functions now return a common set of non-zero error values (where appropriate), defined in userdat.h

    Don't return errno.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net