summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_ldap.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-23 12:59:24 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-23 12:59:24 +0000
commit158efc3aa2060e21f40e231a1e8aa945b6a3ab71 (patch)
tree3d40e855783ac527f14c92ac64dcd96647267fab /source3/passdb/pdb_ldap.c
parent44dd648a646e58ad69f250dcd23fe56d7885efd2 (diff)
downloadsamba-158efc3aa2060e21f40e231a1e8aa945b6a3ab71.tar.gz
samba-158efc3aa2060e21f40e231a1e8aa945b6a3ab71.tar.bz2
samba-158efc3aa2060e21f40e231a1e8aa945b6a3ab71.zip
getpwnam -> getpwnam_alloc.
idra has promised not to revert these this time :-) (This used to be commit f556ad67e82518f5a024ffe9184ff9430ab5c541)
Diffstat (limited to 'source3/passdb/pdb_ldap.c')
-rw-r--r--source3/passdb/pdb_ldap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 2de02d9b76..b8ec37814d 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -500,7 +500,7 @@ static BOOL init_sam_from_ldap (SAM_ACCOUNT * sampass,
/* These values MAY be in LDAP, but they can also be retrieved through
* sys_getpw*() which is how we're doing it
*/
- pw = getpwnam(username);
+ pw = getpwnam_alloc(username);
if (pw == NULL) {
DEBUG (2,("init_sam_from_ldap: User [%s] does not ave a uid!\n", username));
return False;
@@ -508,6 +508,8 @@ static BOOL init_sam_from_ldap (SAM_ACCOUNT * sampass,
uid = pw->pw_uid;
gid = pw->pw_gid;
+ passwd_free(&pw);
+
/* FIXME: hours stuff should be cleaner */
logon_divs = 168;