1
0
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:
Ralph Boehme 2024-02-16 16:33:57 +01:00 committed by Stefan Metzmacher
parent 21b9eb5b8c
commit 315ee3801b
4 changed files with 9 additions and 1 deletions

View File

@ -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:

View File

@ -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";

View File

@ -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;

View File

@ -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;