From: Todd C. Miller Date: Mon, 11 Jun 2012 14:45:53 +0000 (-0400) Subject: Install shared objects with mode 0644 except on HP-UX which needs X-Git-Tag: SUDO_1_7_10~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a5ba0619cd9ea9e787fc3746b4bf0b6c2663d0b;p=sudo Install shared objects with mode 0644 except on HP-UX which needs the executable bit set. --HG-- branch : 1.7 --- diff --git a/Makefile.in b/Makefile.in index 6f5c78a0e..9adb7ef7d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -97,6 +97,7 @@ install_gid = 0 sudoers_uid = @SUDOERS_UID@ sudoers_gid = @SUDOERS_GID@ sudoers_mode = @SUDOERS_MODE@ +shlib_mode = @SHLIB_MODE@ # Pass in paths and uid/gid + OS dependent defined DEFS = @OSDEFS@ -D_PATH_SUDOERS=\"$(sudoersdir)/sudoers\" -DSUDOERS_UID=$(sudoers_uid) -DSUDOERS_GID=$(sudoers_gid) -DSUDOERS_MODE=$(sudoers_mode) @@ -570,7 +571,7 @@ install-binaries: install-dirs $(PROGS) if [ -f sesh ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -m 0755 sesh $(DESTDIR)$(libexecdir)/sesh; fi install-noexec: install-dirs libsudo_noexec.la - if [ -f .libs/lib$(noexecfile) ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -m 0755 .libs/lib$(noexecfile) $(DESTDIR)$(noexecdir)/$(noexecfile); fi + if [ -f .libs/lib$(noexecfile) ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -m $(shlib_mode) .libs/lib$(noexecfile) $(DESTDIR)$(noexecdir)/$(noexecfile); fi install-sudoers: install-dirs $(INSTALL) -d -O $(sudoers_uid) -G $(sudoers_gid) -m 0750 \ @@ -647,6 +648,7 @@ package: sudo.pp sudoers_uid=$(sudoers_uid) \ sudoers_gid=$(sudoers_gid) \ sudoers_mode=$(sudoers_mode) \ + shlib_mode=$(shlib_mode) \ version=$(VERSION) $(PPVARS) .PHONY: ChangeLog diff --git a/configure b/configure index 6a034b96c..fff54f740 100755 --- a/configure +++ b/configure @@ -715,6 +715,7 @@ DEV SUDOERS_GID SUDOERS_UID SUDOERS_MODE +SHLIB_MODE MANCOMPRESSEXT MANCOMPRESS MANTYPE @@ -2854,6 +2855,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;} + # @@ -2903,6 +2905,7 @@ devdir='$(srcdir)' PROGS="sudo visudo" : ${MANTYPE='man'} : ${mansrcdir='.'} +: ${SHLIB_MODE='0644'} : ${SUDOERS_MODE='0440'} : ${SUDOERS_UID='0'} : ${SUDOERS_GID='0'} @@ -13868,6 +13871,9 @@ done *-*-hiuxmpp*) : ${mansectsu='1m'} : ${mansectform='4'} + + # HP-UX shared libs must be executable + SHLIB_MODE=0755 ;; *-*-hpux*) # AFS support needs -lBSD @@ -13877,6 +13883,9 @@ done : ${mansectsu='1m'} : ${mansectform='4'} + # HP-UX shared libs must be executable + SHLIB_MODE=0755 + if test -z "$GCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HP bundled C compiler" >&5 $as_echo_n "checking for HP bundled C compiler... " >&6; } diff --git a/configure.in b/configure.in index e88fd826b..d7135406e 100644 --- a/configure.in +++ b/configure.in @@ -32,6 +32,7 @@ AC_SUBST([AUTH_OBJS]) AC_SUBST([MANTYPE]) AC_SUBST([MANCOMPRESS]) AC_SUBST([MANCOMPRESSEXT]) +AC_SUBST([SHLIB_MODE]) AC_SUBST([SUDOERS_MODE]) AC_SUBST([SUDOERS_UID]) AC_SUBST([SUDOERS_GID]) @@ -145,6 +146,7 @@ devdir='$(srcdir)' PROGS="sudo visudo" : ${MANTYPE='man'} : ${mansrcdir='.'} +: ${SHLIB_MODE='0644'} : ${SUDOERS_MODE='0440'} : ${SUDOERS_UID='0'} : ${SUDOERS_GID='0'} @@ -1522,6 +1524,9 @@ case "$host" in *-*-hiuxmpp*) : ${mansectsu='1m'} : ${mansectform='4'} + + # HP-UX shared libs must be executable + SHLIB_MODE=0755 ;; *-*-hpux*) # AFS support needs -lBSD @@ -1531,6 +1536,9 @@ case "$host" in : ${mansectsu='1m'} : ${mansectform='4'} + # HP-UX shared libs must be executable + SHLIB_MODE=0755 + if test -z "$GCC"; then AC_CACHE_CHECK([for HP bundled C compiler], [sudo_cv_var_hpccbundled], diff --git a/sudo.pp b/sudo.pp index 591a4bcbd..c219012b3 100644 --- a/sudo.pp +++ b/sudo.pp @@ -13,7 +13,6 @@ The basic philosophy is to give as few privileges as possible but \ still allow people to get their work done." vendor="Todd C. Miller" copyright="(c) 1993-1996,1998-2012 Todd C. Miller" - shmode=0644 sudoedit_man=`echo ${pp_destdir}$mandir/*/sudoedit.*|sed "s:^${pp_destdir}::"` sudoedit_man_target=`basename $sudoedit_man | sed 's/edit//'` @@ -34,7 +33,6 @@ still allow people to get their work done." %if [sd] pp_sd_vendor_tag="TCM" # HP-UX shared objects must be executable - shmode=0755 %endif %if [solaris] @@ -251,7 +249,7 @@ still allow people to get their work done." $bindir/sudoedit 0755 root: symlink sudo $sbindir/visudo 0755 $bindir/sudoreplay 0755 - $libexecdir/* $shmode optional + $libexecdir/* $shlib_mode optional $sudoersdir/sudoers.d/ 0750 $sudoers_uid:$sudoers_gid $timedir/ 0700 root: $docdir/ 0755