diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-09-14 23:51:05 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-09-14 23:51:05 +0200 |
commit | 50ca074832b567ee1440b18c33b1fdbab6a2c25e (patch) | |
tree | 54a8ffde9669ad1f2121936899a985e390f3c8ed /nslcd/passwd.c | |
parent | 9657e75d4ca83bb95976ba8e43145c51b11e00ff (diff) |
add note about free()ing the returned value and add logging
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@398 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/passwd.c')
-rw-r--r-- | nslcd/passwd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nslcd/passwd.c b/nslcd/passwd.c index bd0a1fb..1f5d1b8 100644 --- a/nslcd/passwd.c +++ b/nslcd/passwd.c @@ -241,12 +241,16 @@ static enum nss_status _nss_ldap_parse_pw( return NSS_STATUS_SUCCESS; } +/* Note that our caller has to free the returned value with ldap_free() */ char *passwd_username2dn(MYLDAP_SESSION *session,const char *username) { char *userdn=NULL; static const char *no_attrs[]={ NULL }; char filter[1024]; LDAPMessage *res,*e; + /* log call */ + log_log(LOG_DEBUG,"passwd_username2dn(%s)",username); + /* do the LDAP request */ mkfilter_passwd_byname(username,filter,sizeof(filter)); if (_nss_ldap_search_sync(session,passwd_base,passwd_scope,filter,no_attrs,1,&res)==NSS_STATUS_SUCCESS) { |