]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (djm) Bug #26: Use local mkstemp() rather than glibc's silly one. Fixes
authorDamien Miller <djm@mindrot.org>
Tue, 7 Jan 2003 04:18:32 +0000 (15:18 +1100)
committerDamien Miller <djm@mindrot.org>
Tue, 7 Jan 2003 04:18:32 +0000 (15:18 +1100)
   Can't pass KRB4 TGT passing. Fix from: jan.iven@cern.ch

ChangeLog
acconfig.h
configure.ac
openbsd-compat/mktemp.c
openbsd-compat/mktemp.h

index 3be46f5cb9490bb2e612c3ea7181c87e331b052c..681c51f1b1f21b3f00e87424c7e3919c99c0867d 100644 (file)
--- 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 
      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 $
index 3e058f3ea728a195e0c86cc3b25457cbfc59f9d1..314cbaaa48b45646142f1ab3c317adcb1b6112f1 100644 (file)
@@ -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
 /* 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 ************** */
index e96a0721d922ef4293c1d534c85a388ad150f7a2..f01c0c64256df277213a81b6b00b44d5b3c91972 100644 (file)
@@ -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
index d256ee448a4c1304dae65686d619ea908ddbfe85..c951050c04021e1d3f1d0bf7e746a89035a0b843 100644 (file)
@@ -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) */
index 6a96f6fa63414a67fcd5fe256165d841bd7ac934..505ca6a1f23aef1381bf8c8eecf8f8017ce3718c 100644 (file)
@@ -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 */