diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/pdb_unix.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/passdb/pdb_unix.c b/source3/passdb/pdb_unix.c index f5bbeb4ba3..8acc29b7a4 100644 --- a/source3/passdb/pdb_unix.c +++ b/source3/passdb/pdb_unix.c @@ -48,7 +48,7 @@ static NTSTATUS unixsam_getsampwrid (struct pdb_methods *methods, SAM_ACCOUNT *user, uint32 rid) { NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; - struct passwd *pass; + struct passwd *pass = NULL; const char *guest_account = lp_guestaccount(); if (!(guest_account && *guest_account)) { DEBUG(1, ("NULL guest account!?!?\n")); @@ -68,7 +68,9 @@ static NTSTATUS unixsam_getsampwrid (struct pdb_methods *methods, } } else if (pdb_rid_is_user(rid)) { pass = getpwuid_alloc(fallback_pdb_user_rid_to_uid (rid)); - } else { + } + + if (pass == NULL) { return nt_status; } |