summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-01-07 15:18:32 +1100
committerDamien Miller <djm@mindrot.org>2003-01-07 15:18:32 +1100
commite832819cf7289b467070fc31c5080c133f0a101e (patch)
tree5c0cfb811b429cd71c551dda025442f16ccd7114
parent48cb8aa935211ff95ff62267a799d3548df442d4 (diff)
- (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
-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 3be46f5cb..681c51f1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
3 Based on fix from yoshfuji@linux-ipv6.org 3 Based on fix from yoshfuji@linux-ipv6.org
4 - (djm) Bug #442: Check for and deny access to accounts with locked 4 - (djm) Bug #442: Check for and deny access to accounts with locked
5 passwords. Patch from dtucker@zip.com.au 5 passwords. Patch from dtucker@zip.com.au
6 - (djm) Bug #26: Use local mkstemp() rather than glibc's silly one. Fixes
7 Can't pass KRB4 TGT passing. Fix from: jan.iven@cern.ch
6 8
720030103 920030103
8 - (djm) Bug #461: ssh-copy-id fails with no arguments. Patch from 10 - (djm) Bug #461: ssh-copy-id fails with no arguments. Patch from
@@ -931,4 +933,4 @@
931 save auth method before monitor_reset_key_state(); bugzilla bug #284; 933 save auth method before monitor_reset_key_state(); bugzilla bug #284;
932 ok provos@ 934 ok provos@
933 935
934$Id: ChangeLog,v 1.2542 2003/01/07 01:19:32 djm Exp $ 936$Id: ChangeLog,v 1.2543 2003/01/07 04:18:32 djm Exp $
diff --git a/acconfig.h b/acconfig.h
index 3e058f3ea..314cbaaa4 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,4 +1,4 @@
1/* $Id: acconfig.h,v 1.145 2002/09/26 00:38:48 tim Exp $ */ 1/* $Id: acconfig.h,v 1.146 2003/01/07 04:18:33 djm Exp $ */
2 2
3#ifndef _CONFIG_H 3#ifndef _CONFIG_H
4#define _CONFIG_H 4#define _CONFIG_H
@@ -364,6 +364,9 @@
364/* Define if your platform needs to skip post auth file descriptor passing */ 364/* Define if your platform needs to skip post auth file descriptor passing */
365#undef DISABLE_FD_PASSING 365#undef DISABLE_FD_PASSING
366 366
367/* Silly mkstemp() */
368#undef HAVE_STRICT_MKSTEMP
369
367@BOTTOM@ 370@BOTTOM@
368 371
369/* ******************* Shouldn't need to edit below this line ************** */ 372/* ******************* Shouldn't need to edit below this line ************** */
diff --git a/configure.ac b/configure.ac
index e96a0721d..f01c0c642 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.93 2002/11/22 21:29:03 tim Exp $ 1# $Id: configure.ac,v 1.94 2003/01/07 04:18:33 djm Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -680,6 +680,32 @@ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
680 ) 680 )
681fi 681fi
682 682
683dnl see whether mkstemp() requires XXXXXX
684if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
685AC_MSG_CHECKING([for (overly) strict mkstemp])
686AC_TRY_RUN(
687 [
688#include <stdlib.h>
689main() { char template[]="conftest.mkstemp-test";
690if (mkstemp(template) == -1)
691 exit(1);
692unlink(template); exit(0);
693}
694 ],
695 [
696 AC_MSG_RESULT(no)
697 ],
698 [
699 AC_MSG_RESULT(yes)
700 AC_DEFINE(HAVE_STRICT_MKSTEMP)
701 ],
702 [
703 AC_MSG_RESULT(yes)
704 AC_DEFINE(HAVE_STRICT_MKSTEMP)
705 ]
706)
707fi
708
683AC_FUNC_GETPGRP 709AC_FUNC_GETPGRP
684 710
685# Check for PAM libs 711# Check for PAM libs
diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c
index d256ee448..c951050c0 100644
--- a/openbsd-compat/mktemp.c
+++ b/openbsd-compat/mktemp.c
@@ -36,7 +36,7 @@
36 36
37#include "includes.h" 37#include "includes.h"
38 38
39#ifndef HAVE_MKDTEMP 39#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
40 40
41#if defined(LIBC_SCCS) && !defined(lint) 41#if defined(LIBC_SCCS) && !defined(lint)
42static char rcsid[] = "$OpenBSD: mktemp.c,v 1.16 2002/05/27 18:20:45 millert Exp $"; 42static 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)
181 /*NOTREACHED*/ 181 /*NOTREACHED*/
182} 182}
183 183
184#endif /* !HAVE_MKDTEMP */ 184#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */
diff --git a/openbsd-compat/mktemp.h b/openbsd-compat/mktemp.h
index 6a96f6fa6..505ca6a1f 100644
--- a/openbsd-compat/mktemp.h
+++ b/openbsd-compat/mktemp.h
@@ -1,13 +1,13 @@
1/* $Id: mktemp.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ 1/* $Id: mktemp.h,v 1.3 2003/01/07 04:18:33 djm Exp $ */
2 2
3#ifndef _BSD_MKTEMP_H 3#ifndef _BSD_MKTEMP_H
4#define _BSD_MKTEMP_H 4#define _BSD_MKTEMP_H
5 5
6#include "config.h" 6#include "config.h"
7#ifndef HAVE_MKDTEMP 7#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
8int mkstemps(char *path, int slen); 8int mkstemps(char *path, int slen);
9int mkstemp(char *path); 9int mkstemp(char *path);
10char *mkdtemp(char *path); 10char *mkdtemp(char *path);
11#endif /* !HAVE_MKDTEMP */ 11#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */
12 12
13#endif /* _BSD_MKTEMP_H */ 13#endif /* _BSD_MKTEMP_H */