From b56bce3127b4021d237f46adf253becbf6c0ca7e Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 14 Nov 2016 14:38:01 -0700 Subject: [PATCH] Remove HP-UX 9 support, it is not modern enough for sudo. --- config.h.in | 4 ---- configure | 26 -------------------------- configure.ac | 13 ------------- plugins/sudoers/getspwuid.c | 14 -------------- 4 files changed, 57 deletions(-) diff --git a/config.h.in b/config.h.in index b090672b0..823823584 100644 --- a/config.h.in +++ b/config.h.in @@ -297,10 +297,6 @@ passwords). */ #undef HAVE_GETSPNAM -/* Define to 1 if you have the `getspwuid' function. (HP-UX <= 9.X shadow - passwords). */ -#undef HAVE_GETSPWUID - /* Define to 1 if you have the `getttyent' function. */ #undef HAVE_GETTTYENT diff --git a/configure b/configure index 758d41e42..015043a6a 100755 --- a/configure +++ b/configure @@ -15092,31 +15092,6 @@ $as_echo "$sudo_cv_var_daportable" >&6; } esac case "$host_os" in - hpux9.*) - shadow_funcs="getspwuid" - - # 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 - SUDOERS_LIBS="${SUDOERS_LIBS} -ldce -lM -lc_r" - LIBS="${LIBS} -ldce -lM -lc_r" - $as_echo "#define _REENTRANT 1" >>confdefs.h - - - case "${CPPFLAGS}" in - *"-I/usr/include/reentrant"|*"-I/usr/include/reentrant ") - ;; - *) - if test X"${CPPFLAGS}" = X""; then - CPPFLAGS="-I/usr/include/reentrant" - else - CPPFLAGS="${CPPFLAGS} -I/usr/include/reentrant" - fi - ;; - esac - - fi - ;; hpux10.*) shadow_funcs="getprpwnam iscomsec" shadow_libs="-lsec" @@ -26768,6 +26743,5 @@ fi - diff --git a/configure.ac b/configure.ac index 664a29972..8baff3466 100644 --- a/configure.ac +++ b/configure.ac @@ -1851,18 +1851,6 @@ case "$host" in esac case "$host_os" in - hpux9.*) - shadow_funcs="getspwuid" - - # 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 - SUDOERS_LIBS="${SUDOERS_LIBS} -ldce -lM -lc_r" - LIBS="${LIBS} -ldce -lM -lc_r" - AC_DEFINE(_REENTRANT) - SUDO_APPEND_CPPFLAGS(-I/usr/include/reentrant) - fi - ;; hpux10.*) shadow_funcs="getprpwnam iscomsec" shadow_libs="-lsec" @@ -4315,7 +4303,6 @@ AH_TEMPLATE(HAVE_FWTK, [Define to 1 if you use the FWTK authsrv daemon.]) AH_TEMPLATE(HAVE_GETPRPWNAM, [Define to 1 if you have the `getprpwnam' function. (SecureWare-style shadow passwords).]) AH_TEMPLATE(HAVE_GETPWANAM, [Define to 1 if you have the `getpwanam' function. (SunOS 4.x shadow passwords).]) AH_TEMPLATE(HAVE_GETSPNAM, [Define to 1 if you have the `getspnam' function (SVR4-style shadow passwords).]) -AH_TEMPLATE(HAVE_GETSPWUID, [Define to 1 if you have the `getspwuid' function. (HP-UX <= 9.X shadow passwords).]) AH_TEMPLATE(HAVE_GSS_KRB5_CCACHE_NAME, [Define to 1 if you have the `gss_krb5_ccache_name' function.]) AH_TEMPLATE(HAVE_HEIMDAL, [Define to 1 if your Kerberos is Heimdal.]) AH_TEMPLATE(HAVE_INET_NTOP, [Define to 1 if you have the `inet_ntop' function.]) diff --git a/plugins/sudoers/getspwuid.c b/plugins/sudoers/getspwuid.c index 0b428f4fc..55020aa46 100644 --- a/plugins/sudoers/getspwuid.c +++ b/plugins/sudoers/getspwuid.c @@ -101,14 +101,6 @@ sudo_getepw(const struct passwd *pw) epw = spw->sp_pwdp; } #endif /* HAVE_GETSPNAM */ -#ifdef HAVE_GETSPWUID - { - struct s_passwd *spw; - - if ((spw = getspwuid(pw->pw_uid)) && spw->pw_passwd) - epw = spw->pw_passwd; - } -#endif /* HAVE_GETSPWUID */ #ifdef HAVE_GETPWANAM { struct passwd_adjunct *spw; @@ -136,9 +128,6 @@ sudo_setspent(void) #ifdef HAVE_GETSPNAM setspent(); #endif -#ifdef HAVE_GETSPWUID - setspwent(); -#endif #ifdef HAVE_GETPWANAM setpwaent(); #endif @@ -156,9 +145,6 @@ sudo_endspent(void) #ifdef HAVE_GETSPNAM endspent(); #endif -#ifdef HAVE_GETSPWUID - endspwent(); -#endif #ifdef HAVE_GETPWANAM endpwaent(); #endif -- 2.40.0