From 2d19a6550bd1dc41fcd9f198fcee18a2e56b6e56 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 21 Oct 2002 20:31:59 +0000 Subject: pdb_unix.c did not really expect group RIDs dictated by a PDC and looking like user RIDs. Volker (This used to be commit 872c7d40454545108ec9e7eee12894af77b4adc3) --- source3/passdb/pdb_unix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3') 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; } -- cgit