s4-lib/samba3: Remove unused smbpasswd_decode_acb_info()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Feb 2012 02:22:37 +0000 (13:22 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 10 Feb 2012 05:45:13 +0000 (16:45 +1100)
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett

source4/lib/samba3/samba3.h
source4/lib/samba3/smbpasswd.c

index 87de13f8f89bf3a69235526b85dfd9510ee29e29..68e201113d16c0eed42b236b4d5f36ad540923d1 100644 (file)
@@ -25,7 +25,6 @@
 
 struct samr_Password *smbpasswd_gethexpwd(TALLOC_CTX *mem_ctx, const char *p);
 char *smbpasswd_sethexpwd(TALLOC_CTX *mem_ctx, struct samr_Password *pwd, uint16_t acb_info);
-uint16_t smbpasswd_decode_acb_info(const char *p);
 char *smbpasswd_encode_acb_info(TALLOC_CTX *mem_ctx, uint16_t acb_info);
 
 #endif /* _SAMBA3_H */
index 502f13febc732408a7d13c389ac8b43c09d74cfa..bab03a92f55ca564aa61806ea5ce808ffa7366c9 100644 (file)
@@ -110,71 +110,6 @@ char *smbpasswd_sethexpwd(TALLOC_CTX *mem_ctx, struct samr_Password *pwd, uint16
        return p;
 }
 
-/*! Decode the account control bits (ACB) info from a string. */
-
-uint16_t smbpasswd_decode_acb_info(const char *p)
-{
-       uint16_t acb_info = 0;
-       bool finished = false;
-
-       /*
-        * Check if the account type bits have been encoded after the
-        * NT password (in the form [NDHTUWSLXI]).
-        */
-
-       if (*p != '[') return 0;
-
-       for (p++; *p && !finished; p++)
-       {
-               switch (*p) {
-               case 'N': /* 'N'o password. */
-                       acb_info |= ACB_PWNOTREQ; 
-                       break;
-               case 'D': /* 'D'isabled. */
-                       acb_info |= ACB_DISABLED; 
-                       break; 
-               case 'H': /* 'H'omedir required. */
-                       acb_info |= ACB_HOMDIRREQ; 
-                       break;
-               case 'T': /* 'T'emp account. */
-                       acb_info |= ACB_TEMPDUP; 
-                       break;
-               case 'U': /* 'U'ser account (normal). */
-                       acb_info |= ACB_NORMAL;
-                       break;
-               case 'M': /* 'M'NS logon user account. What is this ? */
-                       acb_info |= ACB_MNS; 
-                       break; 
-               case 'W': /* 'W'orkstation account. */
-                       acb_info |= ACB_WSTRUST; 
-                       break; 
-               case 'S': /* 'S'erver account. */ 
-                       acb_info |= ACB_SVRTRUST; 
-                       break; 
-               case 'L': /* 'L'ocked account. */
-                       acb_info |= ACB_AUTOLOCK; 
-                       break; 
-               case 'X': /* No 'X'piry on password */
-                       acb_info |= ACB_PWNOEXP; 
-                       break; 
-               case 'I': /* 'I'nterdomain trust account. */
-                       acb_info |= ACB_DOMTRUST; 
-                       break; 
-
-               case ' ': 
-                       break;
-               case ':':
-               case '\n':
-               case ']':
-               default:  
-                       finished = true;
-                       break;
-               }
-       }
-
-       return acb_info;
-}
-
 /*! Encode account control bits (ACBs) into a string. */
 
 char *smbpasswd_encode_acb_info(TALLOC_CTX *mem_ctx, uint16_t acb_info)