summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-01-21 07:51:26 +0000
committerSimo Sorce <idra@samba.org>2002-01-21 07:51:26 +0000
commit38c7fc5fe12cd6400016126dba85cfbbbb59f90a (patch)
treeb4ee101955aba69d16371c74419fc9c7895451ac /source3/passdb
parent2a2f4a24f7c0a9c624db119a11d9afdb27a11b8a (diff)
downloadsamba-38c7fc5fe12cd6400016126dba85cfbbbb59f90a.tar.gz
samba-38c7fc5fe12cd6400016126dba85cfbbbb59f90a.tar.bz2
samba-38c7fc5fe12cd6400016126dba85cfbbbb59f90a.zip
replace getpwnam_alloc with plain getpwnam.
We are not going to reuse any getpw* call, so the extra alloc,copy and free only uses extra memory and extra cpu time for nothing. (This used to be commit 5c0bb0487bec00df494b72b64ddf274f42bfefea)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_tdb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 3d3b620f50..d7bfbb8026 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -140,7 +140,7 @@ 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_alloc(username))) {
+ if (!username || !(pw=getpwnam(username))) {
DEBUG(0,("tdb_sam: getpwnam_alloc(%s) return NULL. User does not exist!\n",
username?username:"NULL"));
ret = False;
@@ -149,7 +149,6 @@ 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);