mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 18:08:23 +00:00
Add check for getresuid() declaration, which may be missing on HP-UX.
When checking for getdomainname() prototype, look in netdb.h too.
This commit is contained in:
parent
c3c28773f5
commit
3eb9a854d8
@ -93,6 +93,10 @@
|
|||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_GETDOMAINNAME
|
#undef HAVE_DECL_GETDOMAINNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `getresuid', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_GETRESUID
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `HOST_NAME_MAX', and to 0 if you
|
/* Define to 1 if you have the declaration of `HOST_NAME_MAX', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_HOST_NAME_MAX
|
#undef HAVE_DECL_HOST_NAME_MAX
|
||||||
|
16
configure
vendored
16
configure
vendored
@ -18630,6 +18630,16 @@ do :
|
|||||||
if test "x$ac_cv_func_getresuid" = xyes; then :
|
if test "x$ac_cv_func_getresuid" = xyes; then :
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE_GETRESUID 1
|
#define HAVE_GETRESUID 1
|
||||||
|
_ACEOF
|
||||||
|
ac_fn_c_check_decl "$LINENO" "getresuid" "ac_cv_have_decl_getresuid" "$ac_includes_default"
|
||||||
|
if test "x$ac_cv_have_decl_getresuid" = xyes; then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else
|
||||||
|
ac_have_decl=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_GETRESUID $ac_have_decl
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -18763,7 +18773,11 @@ if test "x$ac_cv_func_getdomainname" = xyes; then :
|
|||||||
#define HAVE_GETDOMAINNAME 1
|
#define HAVE_GETDOMAINNAME 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
ac_fn_c_check_decl "$LINENO" "getdomainname" "ac_cv_have_decl_getdomainname" "$ac_includes_default"
|
ac_fn_c_check_decl "$LINENO" "getdomainname" "ac_cv_have_decl_getdomainname" "
|
||||||
|
$ac_includes_default
|
||||||
|
#include <netdb.h>
|
||||||
|
|
||||||
|
"
|
||||||
if test "x$ac_cv_have_decl_getdomainname" = xyes; then :
|
if test "x$ac_cv_have_decl_getdomainname" = xyes; then :
|
||||||
ac_have_decl=1
|
ac_have_decl=1
|
||||||
else
|
else
|
||||||
|
@ -2458,7 +2458,7 @@ if test -z "$SKIP_SETRESUID"; then
|
|||||||
AC_CHECK_FUNCS([setresuid], [
|
AC_CHECK_FUNCS([setresuid], [
|
||||||
SKIP_SETREUID=yes
|
SKIP_SETREUID=yes
|
||||||
AC_CHECK_DECLS([setresuid])
|
AC_CHECK_DECLS([setresuid])
|
||||||
AC_CHECK_FUNCS([getresuid])
|
AC_CHECK_FUNCS([getresuid], [AC_CHECK_DECLS([getresuid])])
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
if test -z "$SKIP_SETREUID"; then
|
if test -z "$SKIP_SETREUID"; then
|
||||||
@ -2490,7 +2490,10 @@ AC_INCLUDES_DEFAULT
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
AC_CHECK_FUNCS([getdomainname], [
|
AC_CHECK_FUNCS([getdomainname], [
|
||||||
AC_CHECK_DECLS([getdomainname])
|
AC_CHECK_DECLS([getdomainname], [], [], [
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#include <netdb.h>
|
||||||
|
])
|
||||||
], [
|
], [
|
||||||
AC_CHECK_FUNCS([sysinfo], [AC_CHECK_HEADERS([sys/systeminfo.h])])
|
AC_CHECK_FUNCS([sysinfo], [AC_CHECK_HEADERS([sys/systeminfo.h])])
|
||||||
])
|
])
|
||||||
|
@ -343,8 +343,12 @@ extern int errno;
|
|||||||
* Older HP-UX does not declare setresuid() or setresgid().
|
* Older HP-UX does not declare setresuid() or setresgid().
|
||||||
*/
|
*/
|
||||||
#if defined(HAVE_DECL_SETRESUID) && !HAVE_DECL_SETRESUID
|
#if defined(HAVE_DECL_SETRESUID) && !HAVE_DECL_SETRESUID
|
||||||
int setresuid(uid_t ruid, uid_t euid, uid_t suid);
|
int setresuid(uid_t, uid_t, uid_t);
|
||||||
int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
|
int setresgid(gid_t, gid_t, gid_t);
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_DECL_GETRESUID) && !HAVE_DECL_GETRESUID
|
||||||
|
int getresuid(uid_t *, uid_t *, uid_t *);
|
||||||
|
int getresgid(gid_t *, gid_t *, gid_t *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user