summaryrefslogtreecommitdiffstats
path: root/auth-krb5.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-07-07 12:09:35 +0200
committerDarren Tucker <dtucker@zip.com.au>2005-07-07 12:09:35 +0200
commita83f2612c275aea3168cadd94433590aa15a8ad3 (patch)
tree7a5572b0d05d9d83c398472399e68905b7c9908b /auth-krb5.c
parent - [auth-krb5.c auth.h gss-serv-krb5.c] Move KRB5CCNAME generation for the MIT (diff)
downloadopenssh-a83f2612c275aea3168cadd94433590aa15a8ad3.tar.xz
openssh-a83f2612c275aea3168cadd94433590aa15a8ad3.zip
- (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.
Diffstat (limited to 'auth-krb5.c')
-rw-r--r--auth-krb5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth-krb5.c b/auth-krb5.c
index 01b387c23..6ae4f5fc4 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -222,7 +222,7 @@ ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) {
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:"));