Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

Location:
vendor/current/source4/lib/samba3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/lib/samba3/samba3.h

    r414 r988  
    2626struct samr_Password *smbpasswd_gethexpwd(TALLOC_CTX *mem_ctx, const char *p);
    2727char *smbpasswd_sethexpwd(TALLOC_CTX *mem_ctx, struct samr_Password *pwd, uint16_t acb_info);
    28 uint16_t smbpasswd_decode_acb_info(const char *p);
    2928char *smbpasswd_encode_acb_info(TALLOC_CTX *mem_ctx, uint16_t acb_info);
    3029
  • vendor/current/source4/lib/samba3/smbpasswd.c

    r414 r988  
    111111}
    112112
    113 /*! Decode the account control bits (ACB) info from a string. */
    114 
    115 uint16_t smbpasswd_decode_acb_info(const char *p)
    116 {
    117         uint16_t acb_info = 0;
    118         bool finished = false;
    119 
    120         /*
    121          * Check if the account type bits have been encoded after the
    122          * NT password (in the form [NDHTUWSLXI]).
    123          */
    124 
    125         if (*p != '[') return 0;
    126 
    127         for (p++; *p && !finished; p++)
    128         {
    129                 switch (*p) {
    130                 case 'N': /* 'N'o password. */
    131                         acb_info |= ACB_PWNOTREQ;
    132                         break;
    133                 case 'D': /* 'D'isabled. */
    134                         acb_info |= ACB_DISABLED;
    135                         break;
    136                 case 'H': /* 'H'omedir required. */
    137                         acb_info |= ACB_HOMDIRREQ;
    138                         break;
    139                 case 'T': /* 'T'emp account. */
    140                         acb_info |= ACB_TEMPDUP;
    141                         break;
    142                 case 'U': /* 'U'ser account (normal). */
    143                         acb_info |= ACB_NORMAL;
    144                         break;
    145                 case 'M': /* 'M'NS logon user account. What is this ? */
    146                         acb_info |= ACB_MNS;
    147                         break;
    148                 case 'W': /* 'W'orkstation account. */
    149                         acb_info |= ACB_WSTRUST;
    150                         break;
    151                 case 'S': /* 'S'erver account. */
    152                         acb_info |= ACB_SVRTRUST;
    153                         break;
    154                 case 'L': /* 'L'ocked account. */
    155                         acb_info |= ACB_AUTOLOCK;
    156                         break;
    157                 case 'X': /* No 'X'piry on password */
    158                         acb_info |= ACB_PWNOEXP;
    159                         break;
    160                 case 'I': /* 'I'nterdomain trust account. */
    161                         acb_info |= ACB_DOMTRUST;
    162                         break;
    163 
    164                 case ' ':
    165                         break;
    166                 case ':':
    167                 case '\n':
    168                 case ']':
    169                 default: 
    170                         finished = true;
    171                         break;
    172                 }
    173         }
    174 
    175         return acb_info;
    176 }
    177 
    178113/*! Encode account control bits (ACBs) into a string. */
    179114
Note: See TracChangeset for help on using the changeset viewer.