From a55187bd91a90254168d05928bf99ac8116ceb5e Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Sat, 5 Jun 2010 05:39:36 +0000 Subject: [PATCH] fixup git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30583 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Tools/Makefile.postamble | 28 ++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 287875237..d7b57583c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-06-05 Richard Frith-Macdonald + + * Tools/Makefile.postamble: Fix breakage of instalation of gdomap + (was installing setuid to wrong user ID!). + 2010-06-02 Richard Frith-Macdonald * Source/NSTimeZone.m: revert change of order of sources for zone diff --git a/Tools/Makefile.postamble b/Tools/Makefile.postamble index 856511f36..dc7cb22c6 100644 --- a/Tools/Makefile.postamble +++ b/Tools/Makefile.postamble @@ -50,7 +50,7 @@ after-install:: for file in $(MAN1_PAGES) __done; do \ if [ $$file != __done ]; then \ $(INSTALL_DATA) $$file $(GNUSTEP_DOC_MAN)/man1/$$file; \ - which gzip > /dev/null && rm -f $(GNUSTEP_DOC_MAN)/man1/$$file.gz \ + which gzip && rm -f $(GNUSTEP_DOC_MAN)/man1/$$file.gz \ && gzip -9 $(GNUSTEP_DOC_MAN)/man1/$$file; \ fi; \ done; \ @@ -59,7 +59,7 @@ after-install:: fi; \ for file in $(MAN8_PAGES); do \ $(INSTALL_DATA) $$file $(GNUSTEP_DOC_MAN)/man8/$$file; \ - which gzip > /dev/null && rm -f $(GNUSTEP_DOC_MAN)/man8/$$file.gz \ + which gzip && rm -f $(GNUSTEP_DOC_MAN)/man8/$$file.gz \ && gzip -9 $(GNUSTEP_DOC_MAN)/man8/$$file; \ done$(END_ECHO) ifeq ($(GNUSTEP_INSTALL_GDOMAP_AS_SETUID),no) @@ -70,11 +70,23 @@ ifeq ($(GNUSTEP_INSTALL_GDOMAP_AS_SETUID),no) echo ""$(END_ECHO) else $(ECHO_NOTHING)echo ""; \ - echo "WARNING: Making gdomap in $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_DIR) setuid to root"; \ - echo "WARNING: if possible, you should remove the setuid flag and"; \ - echo "WARNING: have gdomap started by root at machine boot time."; \ - echo ""; \ - $(INSTALL) -m 05755 $(GNUSTEP_OBJ_DIR)/gdomap $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_DIR); \ + if [ "`$(WHOAMI)`" != "root" ]; then \ + echo ""; \ + echo "************************************************************"; \ + echo "WARNING: gdomap has not been made setuid to root ..."; \ + echo "NOTE: Unless gdomap is started as root at system boot time,"; \ + echo "it MUST either be installed owned by root and with the"; \ + echo "'s-bit' or you must have defined 'GDOMAP_PORT_OVERRIDE' in"; \ + echo "gdomap.h before compiling gdomap.c and NSPortNameServer.m"; \ + echo "If either of those cases applies, ignore this message."; \ + echo "************************************************************"; \ + echo ""; \ + else \ + echo "Making gdomap in $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_DIR) setuid to root"; \ + echo "WARNING: if possible, you should remove the setuid flag and"; \ + echo "WARNING: have gdomap started as root at machine boot time."; \ + $(INSTALL) -m 05755 $(GNUSTEP_OBJ_DIR)/gdomap $(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_DIR); \ + fi; \ echo "************************************************************"; \ echo "WARNING: if gdomap is started automatically, it will probe"; \ echo "all machines on your network periodically so that it can make"; \ @@ -84,7 +96,7 @@ else echo "remote systems should be probed), and you should add this"; \ echo "startup command to your system boot scripts!"; \ echo "************************************************************"; \ - echo ""$(END_ECHO) + $(END_ECHO) endif # Things to do before uninstalling