From 0cfc2f19eff04f4d48ba065563238ae18f2e3f5b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 5 Sep 2009 17:14:45 +0200 Subject: s3:winbind: Use fstr_sprintf, it is simpler than talloc_asprintf->fstrcpy --- source3/winbindd/winbindd_pam.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'source3') 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; } -- cgit