]> granicus.if.org Git - sudo/commitdiff
Use correct init.d dir on HP-UX.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 16 Feb 2014 18:00:41 +0000 (11:00 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 16 Feb 2014 18:00:41 +0000 (11:00 -0700)
Fix pp warnings from rc.d and init.d dirs.

configure
configure.ac
sudo.pp

index b55eced05c4cc269203ff933f3da5322f0cb4139..ac741beea990e3f86bd678d3235dc8a14f3d07bd 100755 (executable)
--- a/configure
+++ b/configure
@@ -14256,8 +14256,25 @@ done
                : ${mansectsu='1m'}
                : ${mansectform='4'}
 
+               # HP-UX does not clear /var/run so we need to do it
+               INIT_SCRIPT=hpux.sh
+               INIT_DIR=/sbin/rc.d/init.d
+               RC_LINK=/sbin/rc2.d/S900sudo
+
                # HP-UX shared libs must be executable
                SHLIB_MODE=0755
+
+               for ac_func in pstat_getproc
+do :
+  ac_fn_c_check_func "$LINENO" "pstat_getproc" "ac_cv_func_pstat_getproc"
+if test "x$ac_cv_func_pstat_getproc" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PSTAT_GETPROC 1
+_ACEOF
+
+fi
+done
+
                ;;
     *-*-hpux*)
                # AFS support needs -lBSD
@@ -14269,7 +14286,7 @@ done
 
                # HP-UX does not clear /var/run so we need to do it
                INIT_SCRIPT=hpux.sh
-               INIT_DIR=/etc/rc.d/init.d
+               INIT_DIR=/sbin/rc.d/init.d
                RC_LINK=/sbin/rc2.d/S900sudo
 
                # HP-UX shared libs must be executable
index 6d21732cb4d5a4e95ed105eca95ee31b5963a438..4cc650bd82dad00b7154215211c3526b2a337a28 100644 (file)
@@ -1691,8 +1691,15 @@ case "$host" in
                : ${mansectsu='1m'}
                : ${mansectform='4'}
 
+               # HP-UX does not clear /var/run so we need to do it
+               INIT_SCRIPT=hpux.sh
+               INIT_DIR=/sbin/rc.d/init.d
+               RC_LINK=/sbin/rc2.d/S900sudo
+
                # HP-UX shared libs must be executable
                SHLIB_MODE=0755
+
+               AC_CHECK_FUNCS(pstat_getproc)
                ;;
     *-*-hpux*)
                # AFS support needs -lBSD
@@ -1704,7 +1711,7 @@ case "$host" in
 
                # HP-UX does not clear /var/run so we need to do it
                INIT_SCRIPT=hpux.sh
-               INIT_DIR=/etc/rc.d/init.d
+               INIT_DIR=/sbin/rc.d/init.d
                RC_LINK=/sbin/rc2.d/S900sudo
 
                # HP-UX shared libs must be executable
diff --git a/sudo.pp b/sudo.pp
index 74344bfc5c6b0de322e1c6cb3b63727bdfa57830..cd3a72ff2a8b7333b75c268b3935e3ee9a053e2f 100644 (file)
--- a/sudo.pp
+++ b/sudo.pp
@@ -292,9 +292,16 @@ still allow people to get their work done."
        /usr/sbin/visudo        0755 root: symlink $sbindir/visudo
 %endif
 %if [aix]
+       /etc/rc.d/              ignore
+       /etc/rc.d/rc2.d/        ignore
+       /etc/rc.d/rc2.d/**      ignore
+       /etc/rc.d/init.d/       ignore
        /etc/rc.d/init.d/sudo   0755 root:
 %endif
 %if [sd]
+       /sbin/rc2.d/            ignore
+       /sbin/rc2.d/**          ignore
+       /sbin/init.d/           ignore
        /sbin/init.d/sudo       0755 root:
 %endif
 
@@ -377,12 +384,12 @@ still allow people to get their work done."
                rm -f /etc/rc.d/rc2.d/S90sudo
                ln -s /etc/rc.d/init.d/sudo /etc/rc.d/rc2.d/S90sudo
        fi
-%endif
+
 %post [sd]
        # Create /sbin/rc2.d/S900sudo link
        rm -f /sbin/rc2.d/S900sudo
        ln -s /sbin/init.d/sudo /sbin/rc2.d/S900sudo
-%endif
+
 %preun
        # Remove the time stamp dir and its contents
        # We currently leave the lecture status files installed