]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libwbclient: add WBC_AUTH_PARAM_FLAGS_FOR_NETLOGON to pass WBFLAG_PAM_FOR_NETLOGON
authorStefan Metzmacher <metze@samba.org>
Fri, 21 Mar 2025 17:19:34 +0000 (18:19 +0100)
committerRalph Boehme <slow@samba.org>
Thu, 3 Apr 2025 09:36:31 +0000 (09:36 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
nsswitch/libwbclient/wbc_pam.c
nsswitch/libwbclient/wbclient.h

index 909f3fae6b4516427e6495cb302335c3c8c5be4a..17def8d68632056beff454eea7a617c0bd35db2e 100644 (file)
@@ -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;
index b7786266074358a54e145477197458ddb611648f..31a7e4920980ce4c7e93b8212d5f0e4607ba4508 100644 (file)
@@ -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