diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-01-23 12:59:24 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-01-23 12:59:24 +0000 |
commit | 158efc3aa2060e21f40e231a1e8aa945b6a3ab71 (patch) | |
tree | 3d40e855783ac527f14c92ac64dcd96647267fab /source3/passdb/pdb_tdb.c | |
parent | 44dd648a646e58ad69f250dcd23fe56d7885efd2 (diff) | |
download | samba-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_tdb.c')
-rw-r--r-- | source3/passdb/pdb_tdb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 30fe3dc354..b1ba01fe98 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -141,14 +141,16 @@ 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; } uid = pw->pw_uid; gid = pw->pw_gid; + + passwd_free(&pw); pdb_set_uid(sampass, uid); pdb_set_gid(sampass, gid); |