summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-09-05 17:14:45 +0200
committerVolker Lendecke <vl@samba.org>2009-09-05 17:14:45 +0200
commit0cfc2f19eff04f4d48ba065563238ae18f2e3f5b (patch)
treeb3526a543513c2e989ec1dacef2b0e143a8fea54
parentc52fa95b95b9cba472c7a4887e5134bcff802899 (diff)
downloadsamba-0cfc2f19eff04f4d48ba065563238ae18f2e3f5b.tar.gz
samba-0cfc2f19eff04f4d48ba065563238ae18f2e3f5b.tar.bz2
samba-0cfc2f19eff04f4d48ba065563238ae18f2e3f5b.zip
s3:winbind: Use fstr_sprintf, it is simpler than talloc_asprintf->fstrcpy
-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;
}