summaryrefslogtreecommitdiffstats
path: root/source/smbd/ipc.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-01-05 23:46:47 +0000
committerJeremy Allison <jra@samba.org>2000-01-05 23:46:47 +0000
commit210d61db08136122f51a93428607fccd582c9e7d (patch)
tree4e430b7989731e64ad584e86ae3ba1bdb9f78a92 /source/smbd/ipc.c
parent9e90122afd1b6a7cf38660fc3bc3aa8e526bf08b (diff)
downloadsamba-210d61db08136122f51a93428607fccd582c9e7d.tar.gz
samba-210d61db08136122f51a93428607fccd582c9e7d.tar.xz
samba-210d61db08136122f51a93428607fccd582c9e7d.zip
Moved check_plaintext_password() into smbd/chgpasswd.c from smbd/ipc.c.
configure configure.in include/config.h.in: Added <sys/un.h> autoconf code for Luke's UNIX domain sockets code. Jeremy.
Diffstat (limited to 'source/smbd/ipc.c')
-rw-r--r--source/smbd/ipc.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index 086a4bfa0b4..737b364c6b0 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -1660,49 +1660,6 @@ static BOOL api_NetRemoteTOD(connection_struct *conn,uint16 vuid, char *param,ch
return(True);
}
-/***********************************************************
- Code to check a plaintext password against smbpasswd entries.
-***********************************************************/
-
-static BOOL check_plaintext_password(char *user,char *old_passwd,
- int old_passwd_size, struct smb_passwd **psmbpw)
-{
- struct smb_passwd *smbpw = NULL;
- uchar old_pw[16],old_ntpw[16];
-
- become_root(False);
- *psmbpw = smbpw = getsmbpwnam(user);
- unbecome_root(False);
-
- if (smbpw == NULL) {
- DEBUG(0,("check_plaintext_password: getsmbpwnam returned NULL\n"));
- return False;
- }
-
- if (smbpw->acct_ctrl & 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: smbpw->smb_nt_passwd \n"));
- dump_data(100,smbpw->smb_nt_passwd,16);
- DEBUG(100,("check_plaintext_password: old_ntpw \n"));
- dump_data(100,old_ntpw,16);
- DEBUG(100,("check_plaintext_password: smbpw->smb_passwd \n"));
- dump_data(100,smbpw->smb_passwd,16);
- DEBUG(100,("check_plaintext_password: old_pw\n"));
- dump_data(100,old_pw,16);
-#endif
-
- if(memcmp(smbpw->smb_nt_passwd,old_ntpw,16) && memcmp(smbpw->smb_passwd,old_pw,16))
- return(False);
- else
- return(True);
-}
-
/****************************************************************************
Set the user password.
*****************************************************************************/