diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-01-21 02:51:23 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-01-21 02:51:23 +0000 |
commit | 59905d44e51d83f2d4a7b6844e0ae764e0b35c0c (patch) | |
tree | f0ca253333bd2da3996bc6ef115dc23807eee93f /source | |
parent | f8208458b3ac05743932d96e4d0a919adc0d9e55 (diff) | |
download | samba-59905d44e51d83f2d4a7b6844e0ae764e0b35c0c.tar.gz samba-59905d44e51d83f2d4a7b6844e0ae764e0b35c0c.tar.xz samba-59905d44e51d83f2d4a7b6844e0ae764e0b35c0c.zip |
getpwnam -> getpwnam_alloc
Diffstat (limited to 'source')
-rw-r--r-- | source/passdb/pdb_tdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c index e05a9066cd3..3d3b620f504 100644 --- a/source/passdb/pdb_tdb.c +++ b/source/passdb/pdb_tdb.c @@ -140,8 +140,8 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, * getpwnam() is used instead of Get_Pwnam() as we do not need * to try case permutations */ - if (!username || !(pw=getpwnam(username))) { - DEBUG(0,("tdb_sam: getpwnam(%s) return NULL. User does not exist!\n", + if (!username || !(pw=getpwnam_alloc(username))) { + DEBUG(0,("tdb_sam: getpwnam_alloc(%s) return NULL. User does not exist!\n", username?username:"NULL")); ret = False; goto done; @@ -149,6 +149,7 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, pdb_set_uid(sampass, pw->pw_uid); gid = pw->pw_gid; pdb_set_gid(sampass, gid); + passwd_free(&pw); } pdb_set_logon_time(sampass, logon_time); |