diff options
author | Luke Leighton <lkcl@samba.org> | 1998-05-07 18:19:05 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-05-07 18:19:05 +0000 |
commit | d8d9f7723337c267a8740750fe19a6387cfbb1f6 (patch) | |
tree | 224590bcd9c5d6d60c5a519741c0662834ba4a1d /source3/passdb/ldap.c | |
parent | 51f88b4f7c0b87dd4a8932168c512b29a4915045 (diff) | |
download | samba-d8d9f7723337c267a8740750fe19a6387cfbb1f6.tar.gz samba-d8d9f7723337c267a8740750fe19a6387cfbb1f6.tar.xz samba-d8d9f7723337c267a8740750fe19a6387cfbb1f6.zip |
created "passdb.c" which is an interface point to (at present) either
smbpasswd or ldap passwd, at compile-time (-DUSE_LDAP).
_none_ of the functions in ldap.c or smbpass.c should be called directly:
only those in passdb.c should be used.
-DUSE_LDAP is unlikely to compile at the moment.
(This used to be commit 57b01ad4ffb14ebd600d4e66602b54ed987f6106)
Diffstat (limited to 'source3/passdb/ldap.c')
-rw-r--r-- | source3/passdb/ldap.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source3/passdb/ldap.c b/source3/passdb/ldap.c index fedc31cbfc9..d9387dfcc48 100644 --- a/source3/passdb/ldap.c +++ b/source3/passdb/ldap.c @@ -475,7 +475,7 @@ static void ldap_get_machine(LDAP *ldap_struct,LDAPMessage *entry, /******************************************************************* find a user or a machine return a smbpass struct. ******************************************************************/ -struct smb_passwd *ldap_get_smbpwd_entry(char *name, int smb_userid) +static struct smb_passwd *ldap_get_smbpwd_entry(char *name, int smb_userid) { LDAP *ldap_struct; LDAPMessage *result; @@ -560,4 +560,24 @@ struct smb_passwd *ldap_get_smbpwd_entry(char *name, int smb_userid) return(&ldap_passwd); } + +/************************************************************************ + Routine to search ldap passwd by name. +*************************************************************************/ + +struct smb_passwd *getldappwnam(char *name) +{ + return ldap_get_smbpwd_entry(name, 0); +} + +/************************************************************************ + Routine to search ldap passwd by uid. +*************************************************************************/ + +struct smb_passwd *getldappwuid(unsigned int uid) +{ + return ldap_get_smbpwd_entry(NULL, uid); +} + + #endif |