s3-winbind: don't try to do clever thing if the username is not found while authentic...
authorMatthieu Patou <mat@matws.net>
Mon, 30 Jan 2012 08:05:08 +0000 (00:05 -0800)
committerMatthieu Patou <mat@samba.org>
Mon, 30 Jan 2012 17:58:12 +0000 (18:58 +0100)
This could cause that we authenticate a user with a bogus domain to
winbind's domain if the password supplied for the PAM_AUTH match.

The problem was reported by Jeff Venable (jvenable@juniper.net).
Patch from Andrew Bartlett (abartlett@samba.org).

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Jan 30 18:58:12 CET 2012 on sn-devel-104

source3/winbindd/winbindd_pam.c

index 41f38a421d71d25f5cd97077521c60ef73a3e73f..93034adb84f9ac4e715dca95f2fbf8129fa9c1ad 100644 (file)
@@ -1079,7 +1079,8 @@ static NTSTATUS winbindd_dual_pam_auth_kerberos(struct winbindd_domain *domain,
                        DEBUG(3, ("Authentication for domain for [%s] -> [%s]\\[%s] failed as %s is not a trusted domain\n",
                                  state->request->data.auth.user, name_domain, name_user, name_domain));
 
-                       contact_domain = find_our_domain();
+                       result =  NT_STATUS_NO_SUCH_USER;
+                       goto done;
                }
        }