summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/password.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index f3a09e8c64..ed3b14102b 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -224,9 +224,11 @@ add a name to the session users list
void add_session_user(const char *user)
{
fstring suser;
- StrnCpy(suser,user,sizeof(suser)-1);
+ struct passwd *passwd;
- if (!Get_Pwnam_Modify(suser)) return;
+ if (!passwd = Get_Pwnam(user)) return;
+
+ StrnCpy(suser,passwd->pw_name,sizeof(suser)-1);
if (suser && *suser && !in_list(suser,session_users,False))
{