summaryrefslogtreecommitdiff
path: root/source3/passdb/smbpass.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-05-06 17:43:44 +0000
committerLuke Leighton <lkcl@samba.org>1998-05-06 17:43:44 +0000
commit5fa8775d9758254f6f4784a0e34c9b5b8bf18bdb (patch)
tree8b9e4a311d0b9365bd570ae342e14a39022db1c0 /source3/passdb/smbpass.c
parenta1e1641b84aae432576a3d1b4b9aa724fa61fe5c (diff)
downloadsamba-5fa8775d9758254f6f4784a0e34c9b5b8bf18bdb.tar.gz
samba-5fa8775d9758254f6f4784a0e34c9b5b8bf18bdb.tar.bz2
samba-5fa8775d9758254f6f4784a0e34c9b5b8bf18bdb.zip
jean-francois micouleau's well-alpha code for ldap password database stuff!
he's going to hate me for checking this in so early, but... (This used to be commit ad9ba0a1cbac5c4e6cbcbcadefe8f1df72231f74)
Diffstat (limited to 'source3/passdb/smbpass.c')
-rw-r--r--source3/passdb/smbpass.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index 72e3c3035e..cb3a4a9a99 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -554,7 +554,11 @@ static struct smb_passwd *get_smbpwd_entry(char *name, int smb_userid)
struct smb_passwd *getsmbpwnam(char *name)
{
+#ifdef USE_LDAP
+ return ldap_get_smbpwd_entry(name, 0);
+#else
return get_smbpwd_entry(name, 0);
+#endif /* USE_LDAP */
}
/************************************************************************
@@ -563,7 +567,11 @@ struct smb_passwd *getsmbpwnam(char *name)
struct smb_passwd *getsmbpwuid(unsigned int uid)
{
+#ifdef USE_LDAP
+ return ldap_get_smbpwd_entry(NULL, uid);
+#else
return get_smbpwd_entry(NULL, uid);
+#endif /* USE_LDAP */
}
/**********************************************************
@@ -673,6 +681,7 @@ Error was %s\n", newpwd->smb_name, pfile, strerror(errno)));
sprintf((char *)&p[i*2], "%02X", newpwd->smb_passwd[i]);
}
} else {
+ i=0;
if(newpwd->acct_ctrl & ACB_PWNOTREQ)
sprintf(p, "NO PASSWORDXXXXXXXXXXXXXXXXXXXXX");
else