summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-02-09 13:22:37 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-02-10 16:45:13 +1100
commita74e556a7c2446a25f796a76043d7cdf2d8745b3 (patch)
treea47ec18a86afe1937e8344489fd46cc99399ddb4 /source4
parentefc210d5208a2da1fc33c7ebd745bf806dd26f62 (diff)
downloadsamba-a74e556a7c2446a25f796a76043d7cdf2d8745b3.tar.gz
samba-a74e556a7c2446a25f796a76043d7cdf2d8745b3.tar.bz2
samba-a74e556a7c2446a25f796a76043d7cdf2d8745b3.zip
s4-lib/samba3: Remove unused smbpasswd_decode_acb_info()
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html Andrew Bartlett
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)