&creds);
NT_STATUS_NOT_OK_RETURN(nt_status);
+ if (creds->secure_channel_type == SEC_CHAN_WKSTA) {
+ bool refuse_password_change;
+
+ refuse_password_change = lpcfg_netlogon_refuse_password_change(
+ dce_call->conn->dce_ctx->lp_ctx);
+
+ if (refuse_password_change) {
+ DBG_NOTICE("RefusePasswordChange for Workstation[%s]\n",
+ creds->account_name);
+ return NT_STATUS_WRONG_PASSWORD;
+ }
+ }
+
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
dce_call->conn->dce_ctx->lp_ctx,
&creds);
NT_STATUS_NOT_OK_RETURN(nt_status);
+ if (creds->secure_channel_type == SEC_CHAN_WKSTA) {
+ bool refuse_password_change;
+
+ refuse_password_change = lpcfg_netlogon_refuse_password_change(
+ dce_call->conn->dce_ctx->lp_ctx);
+
+ if (refuse_password_change) {
+ DBG_NOTICE("RefusePasswordChange for Workstation[%s]\n",
+ creds->account_name);
+ return NT_STATUS_WRONG_PASSWORD;
+ }
+ }
+
sam_ctx = samdb_connect(mem_ctx,
dce_call->event_ctx,
dce_call->conn->dce_ctx->lp_ctx,