diff --git a/nsswitch/krb5_plugin/winbind_krb5_localauth.c b/nsswitch/krb5_plugin/winbind_krb5_localauth.c index f610b0cdf8c..80a35de412f 100644 --- a/nsswitch/krb5_plugin/winbind_krb5_localauth.c +++ b/nsswitch/krb5_plugin/winbind_krb5_localauth.c @@ -113,6 +113,7 @@ static krb5_error_code winbind_userok(krb5_context context, /* match other insane libwbclient return codes */ case WBC_ERR_WINBIND_NOT_AVAILABLE: case WBC_ERR_DOMAIN_NOT_FOUND: + case WBC_ERR_NOT_MAPPED: code = KRB5_PLUGIN_NO_HANDLE; break; default: @@ -136,6 +137,7 @@ static krb5_error_code winbind_userok(krb5_context context, /* match other insane libwbclient return codes */ case WBC_ERR_WINBIND_NOT_AVAILABLE: case WBC_ERR_DOMAIN_NOT_FOUND: + case WBC_ERR_NOT_MAPPED: code = KRB5_PLUGIN_NO_HANDLE; break; default: @@ -219,6 +221,7 @@ static krb5_error_code winbind_an2ln(krb5_context context, /* match other insane libwbclient return codes */ case WBC_ERR_WINBIND_NOT_AVAILABLE: case WBC_ERR_DOMAIN_NOT_FOUND: + case WBC_ERR_NOT_MAPPED: code = KRB5_LNAME_NOTRANS; break; default: diff --git a/nsswitch/libwbclient/wbclient.c b/nsswitch/libwbclient/wbclient.c index 4562046a9fe..b6816ccd570 100644 --- a/nsswitch/libwbclient/wbclient.c +++ b/nsswitch/libwbclient/wbclient.c @@ -176,6 +176,8 @@ const char *wbcErrorString(wbcErr error) return "WBC_ERR_AUTH_ERROR"; case WBC_ERR_PWD_CHANGE_FAILED: return "WBC_ERR_PWD_CHANGE_FAILED"; + case WBC_ERR_NOT_MAPPED: + return "WBC_ERR_NOT_MAPPED"; } return "unknown wbcErr value"; diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h index 3ff1fe6d7b9..b7786266074 100644 --- a/nsswitch/libwbclient/wbclient.h +++ b/nsswitch/libwbclient/wbclient.h @@ -47,7 +47,8 @@ enum _wbcErrType { WBC_ERR_AUTH_ERROR, /**< Authentication failed **/ WBC_ERR_UNKNOWN_USER, /**< User account cannot be found */ WBC_ERR_UNKNOWN_GROUP, /**< Group account cannot be found */ - WBC_ERR_PWD_CHANGE_FAILED /**< Password Change has failed */ + WBC_ERR_PWD_CHANGE_FAILED, /**< Password Change has failed */ + WBC_ERR_NOT_MAPPED /**< Translation function failed on some element **/ }; typedef enum _wbcErrType wbcErr; diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index 5e5cf0af8b8..968a72bccc0 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -40,6 +40,7 @@ static int wbc_error_to_pam_error(wbcErr status) case WBC_ERR_WINBIND_NOT_AVAILABLE: return PAM_AUTHINFO_UNAVAIL; case WBC_ERR_DOMAIN_NOT_FOUND: + case WBC_ERR_NOT_MAPPED: return PAM_AUTHINFO_UNAVAIL; case WBC_ERR_INVALID_RESPONSE: return PAM_BUF_ERR; @@ -2143,6 +2144,7 @@ static int valid_user(struct pwb_context *ctx, /* match other insane libwbclient return codes */ case WBC_ERR_WINBIND_NOT_AVAILABLE: case WBC_ERR_DOMAIN_NOT_FOUND: + case WBC_ERR_NOT_MAPPED: return 1; case WBC_ERR_SUCCESS: return 0;