summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--acconfig.h5
-rw-r--r--configure.ac28
-rw-r--r--openbsd-compat/mktemp.c4
-rw-r--r--openbsd-compat/mktemp.h6
5 files changed, 39 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 3be46f5c..681c51f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
Based on fix from yoshfuji@linux-ipv6.org
- (djm) Bug #442: Check for and deny access to accounts with locked
passwords. Patch from dtucker@zip.com.au
+ - (djm) Bug #26: Use local mkstemp() rather than glibc's silly one. Fixes
+ Can't pass KRB4 TGT passing. Fix from: jan.iven@cern.ch
20030103
- (djm) Bug #461: ssh-copy-id fails with no arguments. Patch from
@@ -931,4 +933,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
-$Id: ChangeLog,v 1.2542 2003/01/07 01:19:32 djm Exp $
+$Id: ChangeLog,v 1.2543 2003/01/07 04:18:32 djm Exp $
diff --git a/acconfig.h b/acconfig.h
index 3e058f3e..314cbaaa 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,4 +1,4 @@
-/* $Id: acconfig.h,v 1.145 2002/09/26 00:38:48 tim Exp $ */
+/* $Id: acconfig.h,v 1.146 2003/01/07 04:18:33 djm Exp $ */
#ifndef _CONFIG_H
#define _CONFIG_H
@@ -364,6 +364,9 @@
/* Define if your platform needs to skip post auth file descriptor passing */
#undef DISABLE_FD_PASSING
+/* Silly mkstemp() */
+#undef HAVE_STRICT_MKSTEMP
+
@BOTTOM@
/* ******************* Shouldn't need to edit below this line ************** */
diff --git a/configure.ac b/configure.ac
index e96a0721..f01c0c64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.93 2002/11/22 21:29:03 tim Exp $
+# $Id: configure.ac,v 1.94 2003/01/07 04:18:33 djm Exp $
AC_INIT
AC_CONFIG_SRCDIR([ssh.c])
@@ -680,6 +680,32 @@ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
)
fi
+dnl see whether mkstemp() requires XXXXXX
+if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
+AC_MSG_CHECKING([for (overly) strict mkstemp])
+AC_TRY_RUN(
+ [
+#include <stdlib.h>
+main() { char template[]="conftest.mkstemp-test";
+if (mkstemp(template) == -1)
+ exit(1);
+unlink(template); exit(0);
+}
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_STRICT_MKSTEMP)
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_STRICT_MKSTEMP)
+ ]
+)
+fi
+
AC_FUNC_GETPGRP
# Check for PAM libs
diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c
index d256ee44..c951050c 100644
--- a/openbsd-compat/mktemp.c
+++ b/openbsd-compat/mktemp.c
@@ -36,7 +36,7 @@
#include "includes.h"
-#ifndef HAVE_MKDTEMP
+#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$OpenBSD: mktemp.c,v 1.16 2002/05/27 18:20:45 millert Exp $";
@@ -181,4 +181,4 @@ _gettemp(path, doopen, domkdir, slen)
/*NOTREACHED*/
}
-#endif /* !HAVE_MKDTEMP */
+#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */
diff --git a/openbsd-compat/mktemp.h b/openbsd-compat/mktemp.h
index 6a96f6fa..505ca6a1 100644
--- a/openbsd-compat/mktemp.h
+++ b/openbsd-compat/mktemp.h
@@ -1,13 +1,13 @@
-/* $Id: mktemp.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
+/* $Id: mktemp.h,v 1.3 2003/01/07 04:18:33 djm Exp $ */
#ifndef _BSD_MKTEMP_H
#define _BSD_MKTEMP_H
#include "config.h"
-#ifndef HAVE_MKDTEMP
+#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
int mkstemps(char *path, int slen);
int mkstemp(char *path);
char *mkdtemp(char *path);
-#endif /* !HAVE_MKDTEMP */
+#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */
#endif /* _BSD_MKTEMP_H */