Bugzilla – Attachment 129 Details for
Bug 44
Can't pass KRB4 TGT on RH7.2 due to glibc mkstemp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to allow configure to detect an overly strict mkstemp()
patch-openssh-mkstemp (text/plain), 4.33 KB, created by
Jan Iven
on 2002-07-05 01:12:29 AEST
(
hide
)
Description:
patch to allow configure to detect an overly strict mkstemp()
Filename:
MIME Type:
Creator:
Jan Iven
Created:
2002-07-05 01:12:29 AEST
Size:
4.33 KB
patch
obsolete
>This patch should make sure that we use the openbsd-compat "mkstemp()" >unless the native version can handle templates without XXXXXX. > >Otherwise we get a runtime error when creating KRB4 ticket cache >files, e.g. on RH7. > >Per SUSv3, mkstemp users SHOULD use the XXXXXX in the template. GNU >glibc implements MUST, and will not change this. > > >--- openssh-3.4p1/configure.ac Wed Jun 26 00:35:16 2002 >+++ openssh-3.4p1.CERN/configure.ac Tue Jul 2 11:29:53 2002 >@@ -601,6 +601,32 @@ > ) > fi > >+dnl see whether mkstemp() requires XXXXXX >+if test $ac_cv_func_mkdtemp = yes ; 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); >+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 >+ > dnl IRIX and Solaris 2.5.1 have dirname() in libgen > AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[ > AC_CHECK_LIB(gen, dirname,[ >configure >--- openssh-3.4p1/configure Wed Jun 26 16:08:18 2002 >+++ openssh-3.4p1.CERN/configure Tue Jul 2 11:38:41 2002 >@@ -6585,6 +6585,60 @@ > fi > fi > >+if test $ac_cv_func_mkdtemp = yes ; then >+echo "$as_me:5532: checking for (overly) strict mkstemp" >&5 >+echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6 >+if test "$cross_compiling" = yes; then >+ >+ echo "$as_me:5536: result: yes" >&5 >+echo "${ECHO_T}yes" >&6 >+ cat >>confdefs.h <<\EOF >+#define HAVE_STRICT_MKSTEMP 1 >+EOF >+ >+else >+ cat >conftest.$ac_ext <<_ACEOF >+#line 5544 "configure" >+#include "confdefs.h" >+ >+#include <stdlib.h> >+main() { char template[]="conftest.mkstemp-test"; >+if (mkstemp(template) == -1) >+ exit(1); >+exit(0); >+} >+ >+_ACEOF >+rm -f conftest$ac_exeext >+if { (eval echo "$as_me:5556: \"$ac_link\"") >&5 >+ (eval $ac_link) 2>&5 >+ ac_status=$? >+ echo "$as_me:5559: \$? = $ac_status" >&5 >+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' >+ { (eval echo "$as_me:5561: \"$ac_try\"") >&5 >+ (eval $ac_try) 2>&5 >+ ac_status=$? >+ echo "$as_me:5564: \$? = $ac_status" >&5 >+ (exit $ac_status); }; }; then >+ >+ echo "$as_me:5567: result: no" >&5 >+echo "${ECHO_T}no" >&6 >+ >+else >+ echo "$as_me: program exited with status $ac_status" >&5 >+echo "$as_me: failed program was:" >&5 >+cat conftest.$ac_ext >&5 >+ >+ echo "$as_me:5575: result: yes" >&5 >+echo "${ECHO_T}yes" >&6 >+ cat >>confdefs.h <<\EOF >+#define HAVE_STRICT_MKSTEMP 1 >+EOF >+ >+fi >+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext >+fi >+fi > > for ac_func in dirname > do >openbsd-compat/mktemp.c >--- openssh-3.4p1/openbsd-compat/mktemp.c Wed Feb 13 06:00:16 2002 >+++ openssh-3.4p1.CERN/openbsd-compat/mktemp.c Tue Jul 2 11:28:57 2002 >@@ -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.14 2002/01/02 20:18:32 deraadt Exp $"; >@@ -181,4 +181,4 @@ > /*NOTREACHED*/ > } > >-#endif /* !HAVE_MKDTEMP */ >+#endif /* !HAVE_MKDTEMP || HAVE_STRICT_MKSTEMP */ >/openbsd-compat/mktemp.h >--- openssh-3.4p1//openbsd-compat/mktemp.h Fri Feb 9 02:55:36 2001 >+++ openssh-3.4p1.CERN//openbsd-compat/mktemp.h Tue Jul 2 11:29:11 2002 >@@ -4,10 +4,10 @@ > #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 /* !HAVE_MKDTEMP || HAVE_STRICT_MKSTEMP*/ > > #endif /* _BSD_MKTEMP_H */ >--- openssh-3.4p1/acconfig.h Wed Jun 26 00:35:16 2002 >+++ openssh-3.4p1.CERN/acconfig.h Tue Jul 2 12:25:47 2002 >@@ -116,6 +116,9 @@ > * message at run-time. */ > #undef RSAREF > >+/* Define if your mkstemp() requires you to put XXXXXX into the template */ >+#undef HAVE_STRICT_MKSTEMP >+ > /* struct timeval */ > #undef HAVE_STRUCT_TIMEVAL > >--- openssh-3.4p1/config.h.in Wed Feb 13 06:00:16 2002 >+++ openssh-3.4p1.CERN/config.h.in Tue Jul 2 11:28:57 2002 >@@ -116,6 +117,9 @@ > * message at run-time. */ > #undef RSAREF > >+/* Define if your mkstemp() requires you to put XXXXXX into the template */ >+#undef HAVE_STRICT_MKSTEMP >+ > /* struct timeval */ > #undef HAVE_STRUCT_TIMEVAL >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44
: 129