diff options
author | Volker Lendecke <vl@samba.org> | 2009-09-05 17:14:45 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-09-05 17:14:45 +0200 |
commit | 0cfc2f19eff04f4d48ba065563238ae18f2e3f5b (patch) | |
tree | b3526a543513c2e989ec1dacef2b0e143a8fea54 /source3 | |
parent | c52fa95b95b9cba472c7a4887e5134bcff802899 (diff) | |
download | samba-0cfc2f19eff04f4d48ba065563238ae18f2e3f5b.tar.gz samba-0cfc2f19eff04f4d48ba065563238ae18f2e3f5b.tar.bz2 samba-0cfc2f19eff04f4d48ba065563238ae18f2e3f5b.zip |
s3:winbind: Use fstr_sprintf, it is simpler than talloc_asprintf->fstrcpy
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 13 |
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; } |