summaryrefslogtreecommitdiff
path: root/source3/smbd/chgpasswd.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-20 09:00:32 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-20 09:00:32 +0000
commitf46db61068573779b56f8580c075ee143c3860d5 (patch)
tree9f70289168f211ff72a0383b88a4fd2a38af29bf /source3/smbd/chgpasswd.c
parent2d06adc3f02ba18b832886bf4cda95679b13a39b (diff)
downloadsamba-f46db61068573779b56f8580c075ee143c3860d5.tar.gz
samba-f46db61068573779b56f8580c075ee143c3860d5.tar.bz2
samba-f46db61068573779b56f8580c075ee143c3860d5.zip
Kill off the old varient of 'check_plaintext_password' (new version just
committed in auth/auth_compat.c and use the new version to make the plaintext password change slightly sane... (Needs testing). Andrew Bartlett (This used to be commit 996d0cd89cf9da5e9749f136f013cc4a8b977ee0)
Diffstat (limited to 'source3/smbd/chgpasswd.c')
-rw-r--r--source3/smbd/chgpasswd.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index b22ccacbf1..5e646b6225 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -934,53 +934,5 @@ BOOL change_oem_password(SAM_ACCOUNT *hnd, char *new_passwd)
return ret;
}
-/***********************************************************
- Code to check a plaintext password against smbpasswd entries.
-***********************************************************/
-
-BOOL check_plaintext_password(char *user, char *old_passwd,
- int old_passwd_size, SAM_ACCOUNT **hnd)
-{
- SAM_ACCOUNT *sampass = NULL;
- uchar old_pw[16], old_ntpw[16];
- BOOL ret;
-
- pdb_init_sam(&sampass);
-
- become_root();
- ret = pdb_getsampwnam(sampass, user);
- unbecome_root();
-
- *hnd = sampass;
-
- if (ret == False)
- {
- DEBUG(0,("check_plaintext_password: getsmbpwnam returned NULL\n"));
- return False;
- }
-
- if (pdb_get_acct_ctrl(sampass) & ACB_DISABLED)
- {
- DEBUG(0,("check_plaintext_password: account %s disabled.\n", user));
- return (False);
- }
- nt_lm_owf_gen(old_passwd, old_ntpw, old_pw);
-#ifdef DEBUG_PASSWORD
- DEBUG(100, ("check_plaintext_password: nt_passwd \n"));
- dump_data(100, pdb_get_nt_passwd(sampass), 16);
- DEBUG(100, ("check_plaintext_password: old_ntpw \n"));
- dump_data(100, old_ntpw, 16);
- DEBUG(100, ("check_plaintext_password: lanman_passwd \n"));
- dump_data(100, pdb_get_lanman_passwd(sampass), 16);
- DEBUG(100, ("check_plaintext_password: old_pw\n"));
- dump_data(100, old_pw, 16);
-#endif
-
- if (memcmp(pdb_get_nt_passwd(sampass), old_ntpw, 16)
- && memcmp(pdb_get_lanman_passwd(sampass), old_pw, 16))
- return (False);
- else
- return (True);
-}