summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-07-07 20:09:35 +1000
committerDarren Tucker <dtucker@zip.com.au>2005-07-07 20:09:35 +1000
commita83f2612c275aea3168cadd94433590aa15a8ad3 (patch)
tree7a5572b0d05d9d83c398472399e68905b7c9908b
parenta916d143a16c59a6bc82df5e1d6b046e17d31848 (diff)
- (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.
-rw-r--r--ChangeLog12
-rw-r--r--auth-krb5.c2
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 823c34bc2..5e4d01470 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
120050707 120050707
2 - [auth-krb5.c auth.h gss-serv-krb5.c] Move KRB5CCNAME generation for the MIT 2 - dtucker [auth-krb5.c auth.h gss-serv-krb5.c] Move KRB5CCNAME generation for
3 Kerberos code path into a common function and expand mkstemp template to be 3 the MIT Kerberos code path into a common function and expand mkstemp
4 consistent with the rest of OpenSSH. From sxw at inf.ed.ac.uk, ok djm@ 4 template to be consistent with the rest of OpenSSH. From sxw at
5 inf.ed.ac.uk, ok djm@
6 - (dtucker) [auth-krb5.c] There's no guarantee that snprintf will set errno
7 in the case where the buffer is insufficient, so always return ENOMEM.
8 Also pointed out by sxw at inf.ed.ac.uk.
5 9
620050706 1020050706
7 - (djm) OpenBSD CVS Sync 11 - (djm) OpenBSD CVS Sync
@@ -2787,4 +2791,4 @@
2787 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 2791 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
2788 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 2792 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
2789 2793
2790$Id: ChangeLog,v 1.3836 2005/07/07 01:50:20 dtucker Exp $ 2794$Id: ChangeLog,v 1.3837 2005/07/07 10:09:35 dtucker Exp $
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) {
222 ret = snprintf(ccname, sizeof(ccname), 222 ret = snprintf(ccname, sizeof(ccname),
223 "FILE:/tmp/krb5cc_%d_XXXXXXXXXX", geteuid()); 223 "FILE:/tmp/krb5cc_%d_XXXXXXXXXX", geteuid());
224 if (ret == -1 || ret >= sizeof(ccname)) 224 if (ret == -1 || ret >= sizeof(ccname))
225 return errno; 225 return ENOMEM;
226 226
227 old_umask = umask(0177); 227 old_umask = umask(0177);
228 tmpfd = mkstemp(ccname + strlen("FILE:")); 228 tmpfd = mkstemp(ccname + strlen("FILE:"));