diff options
author | Luke Leighton <lkcl@samba.org> | 1998-05-11 18:03:01 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-05-11 18:03:01 +0000 |
commit | 9141acecdcebd9276107a500435e3d4545020056 (patch) | |
tree | f4cd71c6a289d6870946270363a36744fc72d4de /source3/passdb/ldap.c | |
parent | 05eb22f77c21f8027e64b0caddefa4d9f030f95f (diff) | |
download | samba-9141acecdcebd9276107a500435e3d4545020056.tar.gz samba-9141acecdcebd9276107a500435e3d4545020056.tar.bz2 samba-9141acecdcebd9276107a500435e3d4545020056.zip |
password back-end database support
ldap.c :
- added getldap21pwent() function
passdb.c :
- getsam21pwent() no longer a stub: calls ldap21 or smb21
smbpass.c :
- added getsmb21pwent() function (he he :-)
lib/rpc/server/srv_samr.c :
- removed "specific" calls to ldap functions; replaced with
call to get_sampwd_entries instead (which is unfinished).
- rewrote get_user_info_21 function to call getsam21pwrid.
(This used to be commit c760ebbf127796427c4602aae61952df938c6def)
Diffstat (limited to 'source3/passdb/ldap.c')
-rw-r--r-- | source3/passdb/ldap.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/source3/passdb/ldap.c b/source3/passdb/ldap.c index 8547cf45cf..7af8a1b9f1 100644 --- a/source3/passdb/ldap.c +++ b/source3/passdb/ldap.c @@ -496,12 +496,37 @@ void *startldappwent(BOOL update) *************************************************************************/ struct smb_passwd *getldappwent(void *vp) { + static struct smb_passwd user; + struct ldap_enum_info *ldap_vp = (struct ldap_enum_info *)vp; + + ldap_vp->entry = ldap_next_entry(ldap_vp->ldap_struct, ldap_vp->entry); + + if (ldap_vp->entry != NULL) + { + ldap_get_smb_passwd(ldap_vp->ldap_struct, ldap_vp->entry, &user); + return &user; + } + return NULL; +} + +/************************************************************************* + Routine to return the next entry in the ldap passwd list. + + do not call this function directly. use passdb.c instead. + *************************************************************************/ +struct sam_passwd *getldap21pwent(void *vp) +{ + static struct sam_passwd user; struct ldap_enum_info *ldap_vp = (struct ldap_enum_info *)vp; + ldap_vp->entry = ldap_next_entry(ldap_vp->ldap_struct, ldap_vp->entry); -/* - make_ldap_sam_user_info_21(ldap_struct, entry, &(pw_buf[(*num_entries)]) ); -*/ + + if (ldap_vp->entry != NULL) + { + ldap_get_sam_passwd(ldap_vp->ldap_struct, ldap_vp->entry, &user); + return &user; + } return NULL; } |