]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pam_winbind: match more return codes when wbcGetPwnam has failed.
authorGünther Deschner <gd@samba.org>
Wed, 19 Sep 2012 08:59:50 +0000 (10:59 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Sep 2012 07:41:19 +0000 (09:41 +0200)
This is required to properly return PAM_USER_UNKNOWN in case winbind had a
problem.

Guenther

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Sep 19 15:06:10 CEST 2012 on sn-devel-104

Fix bug #9177 - pam_winbind's pm_sm_acct_mgmt needs to return PAM_USER_UNKNOWN.

nsswitch/pam_winbind.c

index 025d930f4d32e71e3d5ac2a6d1fc1d12662c469a..fc7cdcaea717ac0bfe814ea1922cb45c5ae4f0e0 100644 (file)
@@ -2063,6 +2063,9 @@ static int valid_user(struct pwb_context *ctx,
 
        switch (wbc_status) {
                case WBC_ERR_UNKNOWN_USER:
+               /* match other insane libwbclient return codes */
+               case WBC_ERR_WINBIND_NOT_AVAILABLE:
+               case WBC_ERR_DOMAIN_NOT_FOUND:
                        return 1;
                case WBC_ERR_SUCCESS:
                        return 0;