diff --git a/configure b/configure index cd087df80..033cb4d48 100755 --- a/configure +++ b/configure @@ -750,6 +750,7 @@ SELINUX_USAGE BSDAUTH_USAGE DONT_LEAK_PATH_INFO INSTALL_NOEXEC +INSTALL_BACKUP sesh_file noexec_file NOEXECDIR @@ -2847,6 +2848,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;} + # @@ -2896,6 +2898,7 @@ PLUGINDIR=/usr/local/libexec/sudo # # End initial values for man page substitution # +INSTALL_BACKUP= INSTALL_NOEXEC= exampledir='$(docdir)/examples' devdir='$(srcdir)' @@ -14908,6 +14911,9 @@ _ACEOF # Load time is much greater if writable so use 0555. SHLIB_MODE=0555 + # HP-UX won't unlink a shared lib that is open + INSTALL_BACKUP='~' + for ac_func in pstat_getproc do : ac_fn_c_check_func "$LINENO" "pstat_getproc" "ac_cv_func_pstat_getproc" @@ -14940,6 +14946,9 @@ done # Load time is much greater if writable so use 0555. SHLIB_MODE=0555 + # HP-UX won't unlink a shared lib that is open + INSTALL_BACKUP='~' + # The HP bundled compiler cannot generate shared libs if test -z "$GCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP bundled C compiler" >&5 diff --git a/configure.ac b/configure.ac index abae6df9b..d64e3c501 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,7 @@ AC_SUBST([NOEXECFILE]) AC_SUBST([NOEXECDIR]) AC_SUBST([noexec_file]) AC_SUBST([sesh_file]) +AC_SUBST([INSTALL_BACKUP]) AC_SUBST([INSTALL_NOEXEC]) AC_SUBST([DONT_LEAK_PATH_INFO]) AC_SUBST([BSDAUTH_USAGE]) @@ -186,6 +187,7 @@ dnl dnl Initial values for Makefile variables listed above dnl May be overridden by environment variables.. dnl +INSTALL_BACKUP= INSTALL_NOEXEC= exampledir='$(docdir)/examples' devdir='$(srcdir)' @@ -1779,6 +1781,9 @@ case "$host" in # Load time is much greater if writable so use 0555. SHLIB_MODE=0555 + # HP-UX won't unlink a shared lib that is open + INSTALL_BACKUP='~' + AC_CHECK_FUNCS([pstat_getproc]) ;; *-*-hpux*) @@ -1800,6 +1805,9 @@ case "$host" in # Load time is much greater if writable so use 0555. SHLIB_MODE=0555 + # HP-UX won't unlink a shared lib that is open + INSTALL_BACKUP='~' + # The HP bundled compiler cannot generate shared libs if test -z "$GCC"; then AC_CACHE_CHECK([for HP bundled C compiler], diff --git a/lib/util/Makefile.in b/lib/util/Makefile.in index 1a5116653..59a581bed 100644 --- a/lib/util/Makefile.in +++ b/lib/util/Makefile.in @@ -52,6 +52,7 @@ AWK = @AWK@ # Our install program supports extra flags... INSTALL = $(SHELL) $(top_srcdir)/install-sh -c INSTALL_OWNER = -o $(install_uid) -g $(install_gid) +INSTALL_BACKUP = @INSTALL_BACKUP@ # C preprocessor defines CPPDEFS = -D_PATH_SUDO_CONF=\"$(sysconfdir)/sudo.conf\" @@ -211,7 +212,7 @@ install: install-dirs case "$(LT_LDFLAGS)" in \ *-no-install*) ;; \ *) if [ X"$(shlib_enable)" = X"yes" ]; then \ - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --quiet --mode=install $(INSTALL) $(INSTALL_OWNER) libsudo_util.la $(DESTDIR)$(libexecdir)/sudo; \ + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --quiet --mode=install $(INSTALL) $(INSTALL_OWNER) libsudo_util.la $(DESTDIR)$(libexecdir)/sudo; \ fi;; \ esac diff --git a/lib/zlib/Makefile.in b/lib/zlib/Makefile.in index 5bf82ff59..22f6601d6 100644 --- a/lib/zlib/Makefile.in +++ b/lib/zlib/Makefile.in @@ -50,6 +50,7 @@ AWK = @AWK@ # Our install program supports extra flags... INSTALL = $(SHELL) $(top_srcdir)/install-sh -c INSTALL_OWNER = -o $(install_uid) -g $(install_gid) +INSTALL_BACKUP = @INSTALL_BACKUP@ # C preprocessor flags CPPFLAGS = -I. -I$(srcdir) @@ -117,7 +118,7 @@ install: case "$(LT_LDFLAGS)" in \ *-no-install*) ;; \ *) if [ X"$(shlib_enable)" = X"yes" ]; then \ - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --quiet --mode=install $(INSTALL) $(INSTALL_OWNER) libsudo_z.la $(DESTDIR)$(libexecdir)/sudo; \ + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --quiet --mode=install $(INSTALL) $(INSTALL_OWNER) libsudo_z.la $(DESTDIR)$(libexecdir)/sudo; \ fi;; \ esac diff --git a/plugins/group_file/Makefile.in b/plugins/group_file/Makefile.in index d256e20d6..fddb90e80 100644 --- a/plugins/group_file/Makefile.in +++ b/plugins/group_file/Makefile.in @@ -35,6 +35,7 @@ AWK = @AWK@ # Our install program supports extra flags... INSTALL = $(SHELL) $(top_srcdir)/install-sh -c INSTALL_OWNER = -o $(install_uid) -g $(install_gid) +INSTALL_BACKUP = @INSTALL_BACKUP@ # Libraries LT_LIBS = $(top_builddir)/lib/util/libsudo_util.la @@ -133,7 +134,7 @@ install-doc: install-plugin: install-dirs group_file.la if [ X"$(shlib_enable)" = X"yes" ]; then \ - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) group_file.la $(DESTDIR)$(plugindir); \ + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) group_file.la $(DESTDIR)$(plugindir); \ fi uninstall: diff --git a/plugins/sample/Makefile.in b/plugins/sample/Makefile.in index 1c339e63b..4230bd696 100644 --- a/plugins/sample/Makefile.in +++ b/plugins/sample/Makefile.in @@ -35,6 +35,7 @@ AWK = @AWK@ # Our install program supports extra flags... INSTALL = $(SHELL) $(top_srcdir)/install-sh -c INSTALL_OWNER = -o $(install_uid) -g $(install_gid) +INSTALL_BACKUP = @INSTALL_BACKUP@ # Libraries LIBS = $(top_builddir)/lib/util/libsudo_util.la @@ -132,7 +133,7 @@ install-doc: install-plugin: install-dirs sample_plugin.la if [ X"$(shlib_enable)" = X"yes" ]; then \ - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sample_plugin.la $(DESTDIR)$(plugindir); \ + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sample_plugin.la $(DESTDIR)$(plugindir); \ fi uninstall: diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 0bff3af09..7f2c96e2c 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -48,6 +48,7 @@ PERL = perl # Our install program supports extra flags... INSTALL = $(SHELL) $(top_srcdir)/install-sh -c INSTALL_OWNER = -o $(install_uid) -g $(install_gid) +INSTALL_BACKUP = @INSTALL_BACKUP@ # Libraries LT_LIBS = $(top_builddir)/lib/util/libsudo_util.la @@ -320,8 +321,8 @@ install-dirs: $(INSTALL) -d $(INSTALL_OWNER) -m 0700 $(DESTDIR)$(vardir)/lectured install-binaries: visudo sudoreplay install-dirs - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 sudoreplay $(DESTDIR)$(replaydir)/sudoreplay - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 visudo $(DESTDIR)$(visudodir)/visudo + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 sudoreplay $(DESTDIR)$(replaydir)/sudoreplay + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 visudo $(DESTDIR)$(visudodir)/visudo install-includes: @@ -332,7 +333,7 @@ install-plugin: sudoers.la install-dirs case "$(LT_LDFLAGS)" in \ *-no-install*) ;; \ *) if [ X"$(shlib_enable)" = X"yes" ]; then \ - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudoers.la $(DESTDIR)$(plugindir); \ + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudoers.la $(DESTDIR)$(plugindir); \ fi;; \ esac diff --git a/plugins/system_group/Makefile.in b/plugins/system_group/Makefile.in index af64ee5d5..1635d3b42 100644 --- a/plugins/system_group/Makefile.in +++ b/plugins/system_group/Makefile.in @@ -35,6 +35,7 @@ AWK = @AWK@ # Our install program supports extra flags... INSTALL = $(SHELL) $(top_srcdir)/install-sh -c INSTALL_OWNER = -o $(install_uid) -g $(install_gid) +INSTALL_BACKUP = @INSTALL_BACKUP@ # Libraries LT_LIBS = $(top_builddir)/lib/util/libsudo_util.la @@ -133,7 +134,7 @@ install-doc: install-plugin: install-dirs system_group.la if [ X"$(shlib_enable)" = X"yes" ]; then \ - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) system_group.la $(DESTDIR)$(plugindir); \ + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) system_group.la $(DESTDIR)$(plugindir); \ fi uninstall: diff --git a/src/Makefile.in b/src/Makefile.in index 3a9b9e586..8f2c45860 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -35,6 +35,7 @@ SED = @SED@ # Our install program supports extra flags... INSTALL = $(SHELL) $(top_srcdir)/install-sh -c INSTALL_OWNER = -o $(install_uid) -g $(install_gid) +INSTALL_BACKUP = @INSTALL_BACKUP@ # Libraries LT_LIBS = $(top_builddir)/lib/util/libsudo_util.la @@ -174,11 +175,11 @@ install-rc: install-dirs fi install-binaries: install-dirs $(PROGS) - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 04755 sudo $(DESTDIR)$(bindir)/sudo + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 04755 sudo $(DESTDIR)$(bindir)/sudo rm -f $(DESTDIR)$(bindir)/sudoedit ln -s sudo $(DESTDIR)$(bindir)/sudoedit if [ -f sesh ]; then \ - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 sesh $(DESTDIR)$(libexecdir)/sudo/sesh; \ + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 sesh $(DESTDIR)$(libexecdir)/sudo/sesh; \ fi install-doc: @@ -186,7 +187,7 @@ install-doc: install-includes: install-noexec: install-dirs sudo_noexec.la - INSTALL_BACKUP='~' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudo_noexec.la $(DESTDIR)$(noexecdir) + INSTALL_BACKUP='$(INSTALL_BACKUP)' $(LIBTOOL) $(LTFLAGS) --mode=install $(INSTALL) $(INSTALL_OWNER) -m $(shlib_mode) sudo_noexec.la $(DESTDIR)$(noexecdir) install-plugin: