[PATCH] Log client process name in winbindd
Andrew Bartlett
abartlet at samba.org
Thu Nov 8 23:56:27 UTC 2018
On Thu, 2018-11-08 at 15:52 -0800, Jeremy Allison via samba-technical
wrote:
> On Thu, Nov 08, 2018 at 08:03:30PM +0100, Andreas Schneider wrote:
> > > EWRONGPATCH :-).
> >
> > Ups, sorry.
>
> Can you add error return checks for all uses of
> snprintf to check for truncated output please ?
>
> RETURN VALUE
> Upon successful return, these functions return the number of characters printed (excluding the null byte used to end output to strings).
>
> The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte ('\0')). If the output was truncated due to this limit,
> then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been availā
> able. Thus, a return value of size or more means that the output was truncated. (See also below under NOTES.)
>
> If an output error is encountered, a negative value is returned.
>
> Now maybe the correct thing to do is
> ignore the truncation, but we need to
> at least acknowledge it in the source
> (even if it's with some kind of an
> 'ignore' comment).
G'Day Jeremy,
I think you have answered yourself here. What could possibly,
practically be done other than to ignore it? We don't want a long
process name to change the behaviour here).
Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
https://catalyst.net.nz/services/samba
More information about the samba-technical
mailing list