From: Stefan Metzmacher Date: Fri, 21 Mar 2025 17:19:34 +0000 (+0100) Subject: libwbclient: add WBC_AUTH_PARAM_FLAGS_FOR_NETLOGON to pass WBFLAG_PAM_FOR_NETLOGON X-Git-Tag: tevent-0.17.0~372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb891b4387fa643dd4810666a4e7e4758cab1bed;p=thirdparty%2Fsamba.git libwbclient: add WBC_AUTH_PARAM_FLAGS_FOR_NETLOGON to pass WBFLAG_PAM_FOR_NETLOGON Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c index 909f3fae6b4..17def8d6863 100644 --- a/nsswitch/libwbclient/wbc_pam.c +++ b/nsswitch/libwbclient/wbc_pam.c @@ -441,6 +441,10 @@ wbcErr wbcCtxAuthenticateUserEx(struct wbcContext *ctx, WBFLAG_PAM_USER_SESSION_KEY | WBFLAG_PAM_LMKEY; + if (params->flags & WBC_AUTH_PARAM_FLAGS_FOR_NETLOGON) { + request.flags |= WBFLAG_PAM_FOR_NETLOGON; + } + if (params->password.response.lm_length && !params->password.response.lm_data) { wbc_status = WBC_ERR_INVALID_PARAM; diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h index b7786266074..31a7e492098 100644 --- a/nsswitch/libwbclient/wbclient.h +++ b/nsswitch/libwbclient/wbclient.h @@ -334,6 +334,7 @@ struct wbcChangePasswordParams { /* wbcAuthUserParams->flags */ #define WBC_AUTH_PARAM_FLAGS_INTERACTIVE_LOGON 0x00000001 +#define WBC_AUTH_PARAM_FLAGS_FOR_NETLOGON 0x00000002 /** * @brief Auth User Information