mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 07:15:27 +00:00
o merge the hpux case entries into a single entry w/ its own sub-case statement.
o HP-UX >= 11 support getspnam(), use it in preference to getprpwuid()
This commit is contained in:
240
configure
vendored
240
configure
vendored
@@ -20087,7 +20087,134 @@ fi
|
|||||||
test -n "$mansectsu" || mansectsu=1m
|
test -n "$mansectsu" || mansectsu=1m
|
||||||
test -n "$mansectform" || mansectform=4
|
test -n "$mansectform" || mansectform=4
|
||||||
;;
|
;;
|
||||||
*-*-hpux1[0-9]*)
|
*-*-hpux*)
|
||||||
|
# AFS support needs -lBSD
|
||||||
|
if test "$with_AFS" = "yes"; then
|
||||||
|
AFS_LIBS="-lc -lBSD"
|
||||||
|
fi
|
||||||
|
test -n "$mansectsu" || mansectsu=1m
|
||||||
|
test -n "$mansectform" || mansectform=4
|
||||||
|
|
||||||
|
case "$host" in
|
||||||
|
*-*-hpux1-8.*)
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define BROKEN_SYSLOG 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
# Not sure if setuid binaries are safe in < 9.x
|
||||||
|
if test -n "$GCC"; then
|
||||||
|
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
|
||||||
|
else
|
||||||
|
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*-*-hpux9.*)
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define BROKEN_SYSLOG 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
if test "$CHECKSHADOW" = "true"; then
|
||||||
|
|
||||||
|
for ac_func in getspwuid
|
||||||
|
do
|
||||||
|
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
|
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||||
|
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
|
||||||
|
if eval "test \"\${$as_ac_var+set}\" = set"; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
|
which can conflict with char $ac_func (); below.
|
||||||
|
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
||||||
|
<limits.h> exists even on freestanding compilers. */
|
||||||
|
#ifdef __STDC__
|
||||||
|
# include <limits.h>
|
||||||
|
#else
|
||||||
|
# include <assert.h>
|
||||||
|
#endif
|
||||||
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
char $ac_func ();
|
||||||
|
/* The GNU C library defines this for functions which it implements
|
||||||
|
to always fail with ENOSYS. Some functions are actually named
|
||||||
|
something starting with __ and the normal name is an alias. */
|
||||||
|
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||||
|
choke me
|
||||||
|
#else
|
||||||
|
char (*f) () = $ac_func;
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return f != $ac_func;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||||
|
(eval $ac_link) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -s conftest$ac_exeext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
eval "$as_ac_var=yes"
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
eval "$as_ac_var=no"
|
||||||
|
fi
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
|
||||||
|
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
|
||||||
|
if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CHECKSHADOW="false"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# DCE support (requires ANSI C compiler)
|
||||||
|
if test "$with_DCE" = "yes"; then
|
||||||
|
# order of libs in 9.X is important. -lc_r must be last
|
||||||
|
SUDO_LIBS="${SUDO_LIBS} -ldce -lM -lc_r"
|
||||||
|
LIBS="${LIBS} -ldce -lM -lc_r"
|
||||||
|
CPPFLAGS="${CPPFLAGS} -D_REENTRANT -I/usr/include/reentrant"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*-*-hpux10.*)
|
||||||
if test "$CHECKSHADOW" = "true"; then
|
if test "$CHECKSHADOW" = "true"; then
|
||||||
echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5
|
echo "$as_me:$LINENO: checking for getprpwnam in -lsec" >&5
|
||||||
echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6
|
echo $ECHO_N "checking for getprpwnam in -lsec... $ECHO_C" >&6
|
||||||
@@ -20213,71 +20340,35 @@ fi
|
|||||||
|
|
||||||
CHECKSHADOW="false"
|
CHECKSHADOW="false"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# AFS support needs -lBSD
|
|
||||||
if test "$with_AFS" = "yes"; then
|
|
||||||
AFS_LIBS="-lc -lBSD"
|
|
||||||
fi
|
|
||||||
test -n "$mansectsu" || mansectsu=1m
|
|
||||||
test -n "$mansectform" || mansectform=4
|
|
||||||
;;
|
;;
|
||||||
*-*-hpux9*)
|
*)
|
||||||
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
#define BROKEN_SYSLOG 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
|
|
||||||
if test "$CHECKSHADOW" = "true"; then
|
if test "$CHECKSHADOW" = "true"; then
|
||||||
|
echo "$as_me:$LINENO: checking for getspnam in -lsec" >&5
|
||||||
for ac_func in getspwuid
|
echo $ECHO_N "checking for getspnam in -lsec... $ECHO_C" >&6
|
||||||
do
|
if test "${ac_cv_lib_sec_getspnam+set}" = set; then
|
||||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
|
||||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
|
||||||
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
|
|
||||||
if eval "test \"\${$as_ac_var+set}\" = set"; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
LIBS="-lsec $LIBS"
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
#line $LINENO "configure"
|
#line $LINENO "configure"
|
||||||
/* confdefs.h. */
|
/* confdefs.h. */
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
|
||||||
which can conflict with char $ac_func (); below.
|
|
||||||
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|
|
||||||
<limits.h> exists even on freestanding compilers. */
|
|
||||||
#ifdef __STDC__
|
|
||||||
# include <limits.h>
|
|
||||||
#else
|
|
||||||
# include <assert.h>
|
|
||||||
#endif
|
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
|
||||||
#endif
|
#endif
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
builtin and then its argument prototype would still apply. */
|
builtin and then its argument prototype would still apply. */
|
||||||
char $ac_func ();
|
char getspnam ();
|
||||||
/* The GNU C library defines this for functions which it implements
|
|
||||||
to always fail with ENOSYS. Some functions are actually named
|
|
||||||
something starting with __ and the normal name is an alias. */
|
|
||||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
|
||||||
choke me
|
|
||||||
#else
|
|
||||||
char (*f) () = $ac_func;
|
|
||||||
#endif
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
return f != $ac_func;
|
getspnam ();
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -20294,64 +20385,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
eval "$as_ac_var=yes"
|
ac_cv_lib_sec_getspnam=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
eval "$as_ac_var=no"
|
ac_cv_lib_sec_getspnam=no
|
||||||
fi
|
fi
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||||
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
fi
|
fi
|
||||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
|
echo "$as_me:$LINENO: result: $ac_cv_lib_sec_getspnam" >&5
|
||||||
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
|
echo "${ECHO_T}$ac_cv_lib_sec_getspnam" >&6
|
||||||
if test `eval echo '${'$as_ac_var'}'` = yes; then
|
if test $ac_cv_lib_sec_getspnam = yes; then
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
#define HAVE_GETSPNAM 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CHECKSHADOW="false"
|
CHECKSHADOW="false"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# DCE support (requires ANSI C compiler)
|
|
||||||
if test "$with_DCE" = "yes"; then
|
|
||||||
# order of libs in 9.X is important. -lc_r must be last
|
|
||||||
SUDO_LIBS="${SUDO_LIBS} -ldce -lM -lc_r"
|
|
||||||
LIBS="${LIBS} -ldce -lM -lc_r"
|
|
||||||
CPPFLAGS="${CPPFLAGS} -D_REENTRANT -I/usr/include/reentrant"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# AFS support needs -lBSD
|
|
||||||
if test "$with_AFS" = "yes"; then
|
|
||||||
AFS_LIBS="-lc -lBSD"
|
|
||||||
fi
|
|
||||||
test -n "$mansectsu" || mansectsu=1m
|
|
||||||
test -n "$mansectform" || mansectform=4
|
|
||||||
;;
|
;;
|
||||||
*-*-hpux*)
|
esac
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
#define BROKEN_SYSLOG 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
|
|
||||||
# Not sure if setuid binaries are safe in < 9.x
|
|
||||||
if test -n "$GCC"; then
|
|
||||||
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
|
|
||||||
else
|
|
||||||
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# AFS support needs -lBSD
|
|
||||||
if test "$with_AFS" = "yes"; then
|
|
||||||
AFS_LIBS="-lc -lBSD"
|
|
||||||
fi
|
|
||||||
test -n "$mansectsu" || mansectsu=1m
|
|
||||||
test -n "$mansectform" || mansectform=4
|
|
||||||
;;
|
;;
|
||||||
*-dec-osf*)
|
*-dec-osf*)
|
||||||
# ignore envariables wrt dynamic lib path
|
# ignore envariables wrt dynamic lib path
|
||||||
|
52
configure.in
52
configure.in
@@ -1269,20 +1269,26 @@ case "$host" in
|
|||||||
test -n "$mansectsu" || mansectsu=1m
|
test -n "$mansectsu" || mansectsu=1m
|
||||||
test -n "$mansectform" || mansectform=4
|
test -n "$mansectform" || mansectform=4
|
||||||
;;
|
;;
|
||||||
*-*-hpux1[[0-9]]*)
|
*-*-hpux*)
|
||||||
if test "$CHECKSHADOW" = "true"; then
|
|
||||||
AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) AC_CHECK_LIB(sec, iscomsec, AC_DEFINE(HAVE_ISCOMSEC, 1, [Define if you have the `iscomsec' function. (HP-UX >= 10.x check for shadow enabled)])) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"; SECUREWARE=1])
|
|
||||||
CHECKSHADOW="false"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# AFS support needs -lBSD
|
# AFS support needs -lBSD
|
||||||
if test "$with_AFS" = "yes"; then
|
if test "$with_AFS" = "yes"; then
|
||||||
AFS_LIBS="-lc -lBSD"
|
AFS_LIBS="-lc -lBSD"
|
||||||
fi
|
fi
|
||||||
test -n "$mansectsu" || mansectsu=1m
|
test -n "$mansectsu" || mansectsu=1m
|
||||||
test -n "$mansectform" || mansectform=4
|
test -n "$mansectform" || mansectform=4
|
||||||
|
|
||||||
|
case "$host" in
|
||||||
|
*-*-hpux[1-8].*)
|
||||||
|
AC_DEFINE(BROKEN_SYSLOG)
|
||||||
|
|
||||||
|
# Not sure if setuid binaries are safe in < 9.x
|
||||||
|
if test -n "$GCC"; then
|
||||||
|
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
|
||||||
|
else
|
||||||
|
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*-*-hpux9*)
|
*-*-hpux9.*)
|
||||||
AC_DEFINE(BROKEN_SYSLOG, 1, [Define if the `syslog' function returns a non-zero int to denote failure.])
|
AC_DEFINE(BROKEN_SYSLOG, 1, [Define if the `syslog' function returns a non-zero int to denote failure.])
|
||||||
|
|
||||||
if test "$CHECKSHADOW" = "true"; then
|
if test "$CHECKSHADOW" = "true"; then
|
||||||
@@ -1298,30 +1304,20 @@ case "$host" in
|
|||||||
LIBS="${LIBS} -ldce -lM -lc_r"
|
LIBS="${LIBS} -ldce -lM -lc_r"
|
||||||
CPPFLAGS="${CPPFLAGS} -D_REENTRANT -I/usr/include/reentrant"
|
CPPFLAGS="${CPPFLAGS} -D_REENTRANT -I/usr/include/reentrant"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# AFS support needs -lBSD
|
|
||||||
if test "$with_AFS" = "yes"; then
|
|
||||||
AFS_LIBS="-lc -lBSD"
|
|
||||||
fi
|
|
||||||
test -n "$mansectsu" || mansectsu=1m
|
|
||||||
test -n "$mansectform" || mansectform=4
|
|
||||||
;;
|
;;
|
||||||
*-*-hpux*)
|
*-*-hpux10.*)
|
||||||
AC_DEFINE(BROKEN_SYSLOG)
|
if test "$CHECKSHADOW" = "true"; then
|
||||||
|
AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) AC_CHECK_LIB(sec, iscomsec, AC_DEFINE(HAVE_ISCOMSEC, 1, [Define if you have the `iscomsec' function. (HP-UX >= 10.x check for shadow enabled)])) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"; SECUREWARE=1])
|
||||||
# Not sure if setuid binaries are safe in < 9.x
|
CHECKSHADOW="false"
|
||||||
if test -n "$GCC"; then
|
|
||||||
SUDO_LDFLAGS="${SUDO_LDFLAGS} -static"
|
|
||||||
else
|
|
||||||
SUDO_LDFLAGS="${SUDO_LDFLAGS} -Wl,-a,archive"
|
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
# AFS support needs -lBSD
|
*)
|
||||||
if test "$with_AFS" = "yes"; then
|
if test "$CHECKSHADOW" = "true"; then
|
||||||
AFS_LIBS="-lc -lBSD"
|
AC_CHECK_LIB(sec, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"])
|
||||||
|
CHECKSHADOW="false"
|
||||||
fi
|
fi
|
||||||
test -n "$mansectsu" || mansectsu=1m
|
;;
|
||||||
test -n "$mansectform" || mansectform=4
|
esac
|
||||||
;;
|
;;
|
||||||
*-dec-osf*)
|
*-dec-osf*)
|
||||||
# ignore envariables wrt dynamic lib path
|
# ignore envariables wrt dynamic lib path
|
||||||
|
Reference in New Issue
Block a user