in the case where the buffer is insufficient, so always return ENOMEM.
Also pointed out by sxw at inf.ed.ac.uk.
20050707
- - [auth-krb5.c auth.h gss-serv-krb5.c] Move KRB5CCNAME generation for the MIT
- Kerberos code path into a common function and expand mkstemp template to be
- consistent with the rest of OpenSSH. From sxw at inf.ed.ac.uk, ok djm@
+ - dtucker [auth-krb5.c auth.h gss-serv-krb5.c] Move KRB5CCNAME generation for
+ the MIT Kerberos code path into a common function and expand mkstemp
+ template to be consistent with the rest of OpenSSH. From sxw at
+ inf.ed.ac.uk, ok djm@
+ - (dtucker) [auth-krb5.c] There's no guarantee that snprintf will set errno
+ in the case where the buffer is insufficient, so always return ENOMEM.
+ Also pointed out by sxw at inf.ed.ac.uk.
20050706
- (djm) OpenBSD CVS Sync
ret = snprintf(ccname, sizeof(ccname),
"FILE:/tmp/krb5cc_%d_XXXXXXXXXX", geteuid());
if (ret == -1 || ret >= sizeof(ccname))
- return errno;
+ return ENOMEM;
old_umask = umask(0177);
tmpfd = mkstemp(ccname + strlen("FILE:"));