summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-01-21 07:54:09 +0000
committerSimo Sorce <idra@samba.org>2002-01-21 07:54:09 +0000
commit6e22428f278bd5241999b1fe885ccf6af84b8c93 (patch)
tree90c221b2744ccbf7ad3bdbf288c65e1eae2d32e3
parent38c7fc5fe12cd6400016126dba85cfbbbb59f90a (diff)
downloadsamba-6e22428f278bd5241999b1fe885ccf6af84b8c93.tar.gz
samba-6e22428f278bd5241999b1fe885ccf6af84b8c93.tar.bz2
samba-6e22428f278bd5241999b1fe885ccf6af84b8c93.zip
fix also the comment.
(This used to be commit 7f7a15e09a53a03dd423d40201f037f8da049cd7)
-rw-r--r--source3/passdb/pdb_tdb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index d7bfbb8026..a089b947f4 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -136,18 +136,21 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state,
} else {
struct passwd *pw;
+ uid_t uid;
/* validate the account and fill in UNIX uid and gid. Standard
* 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_alloc(%s) return NULL. User does not exist!\n",
+ DEBUG(0,("tdb_sam: getpwnam(%s) return NULL. User does not exist!\n",
username?username:"NULL"));
ret = False;
goto done;
}
- pdb_set_uid(sampass, pw->pw_uid);
+ uid_t = pw->pw_uid;
gid = pw->pw_gid;
+
+ pdb_set_uid(sampass, uid);
pdb_set_gid(sampass, gid);
}