View | Details | Raw Unified | Return to bug 44
Collapse All | Expand All

(-)openssh-3.4p1/configure.ac (+26 lines)
Lines 601-606 Link Here
601
)
601
)
602
fi
602
fi
603
603
604
dnl see whether mkstemp() requires XXXXXX
605
if test $ac_cv_func_mkdtemp = yes ; then
606
AC_MSG_CHECKING([for (overly) strict mkstemp])
607
AC_TRY_RUN(
608
	[
609
#include <stdlib.h>
610
main() { char template[]="conftest.mkstemp-test";
611
if (mkstemp(template) == -1)
612
	exit(1);
613
exit(0);
614
}
615
	],
616
	[
617
		AC_MSG_RESULT(no)
618
	],
619
	[ 
620
		AC_MSG_RESULT(yes)
621
		AC_DEFINE(HAVE_STRICT_MKSTEMP)
622
	],
623
	[
624
		AC_MSG_RESULT(yes)
625
		AC_DEFINE(HAVE_STRICT_MKSTEMP)
626
	] 
627
)
628
fi
629
604
dnl IRIX and Solaris 2.5.1 have dirname() in libgen
630
dnl IRIX and Solaris 2.5.1 have dirname() in libgen
605
AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
631
AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
606
	AC_CHECK_LIB(gen, dirname,[
632
	AC_CHECK_LIB(gen, dirname,[
(-)openssh-3.4p1/configure (+54 lines)
Lines 6585-6590 Link Here
6585
fi
6585
fi
6586
fi
6586
fi
6587
6587
6588
if test $ac_cv_func_mkdtemp = yes ; then
6589
echo "$as_me:5532: checking for (overly) strict mkstemp" >&5
6590
echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6
6591
if test "$cross_compiling" = yes; then
6592
6593
               echo "$as_me:5536: result: yes" >&5
6594
echo "${ECHO_T}yes" >&6
6595
               cat >>confdefs.h <<\EOF
6596
#define HAVE_STRICT_MKSTEMP 1
6597
EOF
6598
6599
else
6600
  cat >conftest.$ac_ext <<_ACEOF
6601
#line 5544 "configure"
6602
#include "confdefs.h"
6603
6604
#include <stdlib.h>
6605
main() { char template[]="conftest.mkstemp-test";
6606
if (mkstemp(template) == -1)
6607
       exit(1);
6608
exit(0);
6609
}
6610
6611
_ACEOF
6612
rm -f conftest$ac_exeext
6613
if { (eval echo "$as_me:5556: \"$ac_link\"") >&5
6614
  (eval $ac_link) 2>&5
6615
  ac_status=$?
6616
  echo "$as_me:5559: \$? = $ac_status" >&5
6617
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6618
  { (eval echo "$as_me:5561: \"$ac_try\"") >&5
6619
  (eval $ac_try) 2>&5
6620
  ac_status=$?
6621
  echo "$as_me:5564: \$? = $ac_status" >&5
6622
  (exit $ac_status); }; }; then
6623
6624
               echo "$as_me:5567: result: no" >&5
6625
echo "${ECHO_T}no" >&6
6626
6627
else
6628
  echo "$as_me: program exited with status $ac_status" >&5
6629
echo "$as_me: failed program was:" >&5
6630
cat conftest.$ac_ext >&5
6631
6632
               echo "$as_me:5575: result: yes" >&5
6633
echo "${ECHO_T}yes" >&6
6634
               cat >>confdefs.h <<\EOF
6635
#define HAVE_STRICT_MKSTEMP 1
6636
EOF
6637
6638
fi
6639
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6640
fi
6641
fi
6588
6642
6589
for ac_func in dirname
6643
for ac_func in dirname
6590
do
6644
do
(-)openssh-3.4p1/openbsd-compat/mktemp.c (-2 / +2 lines)
Lines 36-42 Link Here
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)
42
static char rcsid[] = "$OpenBSD: mktemp.c,v 1.14 2002/01/02 20:18:32 deraadt Exp $";
42
static char rcsid[] = "$OpenBSD: mktemp.c,v 1.14 2002/01/02 20:18:32 deraadt Exp $";
Lines 181-184 Link Here
181
	/*NOTREACHED*/
181
	/*NOTREACHED*/
182
}
182
}
183
183
184
#endif /* !HAVE_MKDTEMP */
184
#endif /* !HAVE_MKDTEMP || HAVE_STRICT_MKSTEMP */
(-)openssh-3.4p1//openbsd-compat/mktemp.h (-2 / +2 lines)
Lines 4-13 Link Here
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) 
8
int mkstemps(char *path, int slen);
8
int mkstemps(char *path, int slen);
9
int mkstemp(char *path);
9
int mkstemp(char *path);
10
char *mkdtemp(char *path);
10
char *mkdtemp(char *path);
11
#endif /* !HAVE_MKDTEMP */
11
#endif /* !HAVE_MKDTEMP || HAVE_STRICT_MKSTEMP*/
12
12
13
#endif /* _BSD_MKTEMP_H */
13
#endif /* _BSD_MKTEMP_H */
(-)openssh-3.4p1/acconfig.h (+3 lines)
Lines 116-121 Link Here
116
 * message at run-time. */
116
 * message at run-time. */
117
#undef RSAREF
117
#undef RSAREF
118
118
119
/* Define if your mkstemp() requires you to put XXXXXX into the template */
120
#undef HAVE_STRICT_MKSTEMP
121
119
/* struct timeval */
122
/* struct timeval */
120
#undef HAVE_STRUCT_TIMEVAL
123
#undef HAVE_STRUCT_TIMEVAL
121
124
(-)openssh-3.4p1/config.h.in (+3 lines)
Lines 116-121 Link Here
116
 * message at run-time. */
117
 * message at run-time. */
117
#undef RSAREF
118
#undef RSAREF
118
119
120
/* Define if your mkstemp() requires you to put XXXXXX into the template */
121
#undef HAVE_STRICT_MKSTEMP
122
119
/* struct timeval */
123
/* struct timeval */
120
#undef HAVE_STRUCT_TIMEVAL
124
#undef HAVE_STRUCT_TIMEVAL
121
125

Return to bug 44