pdb_unix.c did not really expect group RIDs dictated by a PDC and looking
authorVolker Lendecke <vlendec@samba.org>
Mon, 21 Oct 2002 20:31:59 +0000 (20:31 +0000)
committerVolker Lendecke <vlendec@samba.org>
Mon, 21 Oct 2002 20:31:59 +0000 (20:31 +0000)
like user RIDs.

Volker
(This used to be commit 872c7d40454545108ec9e7eee12894af77b4adc3)

source3/passdb/pdb_unix.c

index f5bbeb4ba3c72dc527b4ff93c7ba49129992c739..8acc29b7a467a61a2ac4a8d66fb641a5c7d7e0ae 100644 (file)
@@ -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;
        }