summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/samba3/samba3.h1
-rw-r--r--source4/lib/samba3/smbpasswd.c65
2 files changed, 0 insertions, 66 deletions
diff --git a/source4/lib/samba3/samba3.h b/source4/lib/samba3/samba3.h
index 87de13f8f8..68e201113d 100644
--- a/source4/lib/samba3/samba3.h
+++ b/source4/lib/samba3/samba3.h
@@ -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 */
diff --git a/source4/lib/samba3/smbpasswd.c b/source4/lib/samba3/smbpasswd.c
index 502f13febc..bab03a92f5 100644
--- a/source4/lib/samba3/smbpasswd.c
+++ b/source4/lib/samba3/smbpasswd.c
@@ -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)