mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
libwbclient: add error WBC_ERR_NOT_MAPPED
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
21b9eb5b8c
commit
315ee3801b
@ -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:
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user