diff options
author | Volker Lendecke <vl@samba.org> | 2007-12-19 15:02:59 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2007-12-19 21:09:10 +0100 |
commit | e518e19bc0000019f131354f55e9f5b55f6a2c5e (patch) | |
tree | 5c8723a1510ebb17ff4bd21068aa67159ad3a68d /source3/smbd/password.c | |
parent | 042201bcc1b7ffc88cdc22b64c70c653b2433703 (diff) | |
download | samba-e518e19bc0000019f131354f55e9f5b55f6a2c5e.tar.gz samba-e518e19bc0000019f131354f55e9f5b55f6a2c5e.tar.bz2 samba-e518e19bc0000019f131354f55e9f5b55f6a2c5e.zip |
Remove Get_Pwnam and its associated static variable
All callers are replaced by Get_Pwnam_alloc
(This used to be commit 735f59315497113aebadcf9ad387e3dbfffa284a)
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r-- | source3/smbd/password.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index b3005ba082..6b517c3d86 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -837,9 +837,11 @@ bool authorise_login(int snum, fstring user, DATA_BLOB password, /* check for a normal guest connection */ if (!ok && GUEST_OK(snum)) { + struct passwd *guest_pw; fstring guestname; fstrcpy(guestname,lp_guestaccount()); - if (Get_Pwnam(guestname)) { + guest_pw = Get_Pwnam_alloc(talloc_tos(), guestname); + if (guest_pw != NULL) { fstrcpy(user,guestname); ok = True; DEBUG(3,("authorise_login: ACCEPTED: guest account " @@ -848,6 +850,7 @@ bool authorise_login(int snum, fstring user, DATA_BLOB password, DEBUG(0,("authorise_login: Invalid guest account " "%s??\n",guestname)); } + TALLOC_FREE(guest_pw); *guest = True; } |