From: Günther Deschner Date: Wed, 19 Sep 2012 08:59:50 +0000 (+0200) Subject: pam_winbind: match more return codes when wbcGetPwnam has failed. X-Git-Tag: talloc-2.0.8~269 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98d90c02f0961d173bebb9901c7ad0819827f96e;p=thirdparty%2Fsamba.git pam_winbind: match more return codes when wbcGetPwnam has failed. This is required to properly return PAM_USER_UNKNOWN in case winbind had a problem. Guenther Autobuild-User(master): Günther Deschner Autobuild-Date(master): Wed Sep 19 15:06:10 CEST 2012 on sn-devel-104 --- diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index fb84985155e..83d7bb67da9 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -2064,6 +2064,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;