summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/winbindd/winbindd_pam.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 6e67e466dc..b87d2a8a9b 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -1730,20 +1730,17 @@ void winbindd_pam_auth_crap(struct winbindd_cli_state *state)
}
if (!state->privileged) {
- char *error_string = NULL;
DEBUG(2, ("winbindd_pam_auth_crap: non-privileged access "
"denied. !\n"));
DEBUGADD(2, ("winbindd_pam_auth_crap: Ensure permissions "
"on %s are set correctly.\n",
get_winbind_priv_pipe_dir()));
/* send a better message than ACCESS_DENIED */
- error_string = talloc_asprintf(state->mem_ctx,
- "winbind client not authorized "
- "to use winbindd_pam_auth_crap."
- " Ensure permissions on %s "
- "are set correctly.",
- get_winbind_priv_pipe_dir());
- fstrcpy(state->response->data.auth.error_string, error_string);
+ fstr_sprintf(state->response->data.auth.error_string,
+ "winbind client not authorized to use "
+ "winbindd_pam_auth_crap. Ensure permissions on "
+ "%s are set correctly.",
+ get_winbind_priv_pipe_dir());
result = NT_STATUS_ACCESS_DENIED;
goto done;
}