This fixes problems and adds a couple of goodies to the Makefile:
The permissions of $homedir, all files and all executables are made
configurable.
W_PATH and W_SHELL are defined for the wrapper, so a proper environment is
supplied to programs it runs.
sample.cf is now always installed, so config-test can check for new
variables.
Fixed typo in install-man: that changed the group of man1 twice and man8
not at all.
--- Makefile.orig Wed Nov 27 01:21:29 1996
+++ Makefile Wed Nov 27 01:23:05 1996
@@ -29,6 +29,20 @@
# Enter the UID and GID (not their names!) here:
W_USER = 123
W_GROUP = 45
+
+# This sets the permission of W_HOME. This may be set to a more
+# restrictive mode (perhaps 750 or even 710) on some systems if W_GROUP
+# above is set to the same group that which your mailer runs as (usually
+# daemon). The mailer must have at least execute permission here in order
+# to run the wrapper.
+HOME_CHMOD = 751
+
+# These set the permissions for all installed files and executables (except
+# the wrapper), respectively. Some sites may wish to make these more
+# lenient, or more restrictive.
+# respectively.
+FILE_CHMOD = 644
+EXEC_CHMOD = 755
# If your system is POSIX (e.g. Sun Solaris, SGI Irix 5 and 6, Dec Ultrix MIPS,
# BSDI or other 4.4-based BSD, Linux) use the following three lines. Do not
@@ -58,6 +72,8 @@
W_MAJORDOMO_CF=$(W_HOME)/majordomo.cf
W_BIN=$(W_HOME)
+W_PATH=/bin:/usr/bin:/usr/ucb
+W_SHELL=/bin/sh
WRAPPER_FLAGS = -DBIN=\"$(W_BIN)\" -DPATH=\"PATH=$(W_PATH)\" \
-DHOME=\"HOME=$(W_HOME)\" -DSHELL=\"SHELL=$(W_SHELL)\" \
@@ -125,7 +141,7 @@
install-scripts: config-scripts
- @test -d $(W_HOME) || (mkdir $(W_HOME); chmod 751 $(W_HOME); \
+ @test -d $(W_HOME) || (mkdir $(W_HOME); chmod $(HOME_CHMOD) $(W_HOME); \
chown $(W_USER) $(W_HOME); chgrp $(W_GROUP) $(W_HOME) )
@test -d $(W_BIN)/bin || (mkdir $(W_BIN)/bin; \
chown $(W_USER) $(W_BIN)/bin; chgrp $(W_GROUP) $(W_BIN)/bin )
@@ -133,13 +149,13 @@
@echo "Copying tools to $(W_BIN)/bin"
@for file in $(BINBIN); do \
- $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 755 tmp/$$file $(W_BIN);\
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(EXEC_CHMOD) tmp/$$file $(W_BIN);\
done
@echo "Copying Majordomo files to $(W_BIN)"
@for file in $(BIN); do \
- $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 755 tmp/$$file $(W_BIN);\
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(EXEC_CHMOD) tmp/$$file $(W_BIN);\
done
@echo "Copying archiving and other tools to $(W_BIN)/Tools"
@@ -147,29 +163,33 @@
@test -d $(W_BIN)/Tools || (mkdir $(W_BIN)/Tools; \
chown $(W_USER) $(W_BIN)/Tools; chgrp $(W_GROUP) $(W_BIN)/Tools)
@for file in $(TOOLS); do \
- $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 755 tmp/$$file $(W_BIN)/Tools; \
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(EXEC_CHMOD) tmp/$$file $(W_BIN)/Tools; \
done
@rm -rf tmp
-# the install.cf target will install the sample config file in the
-# proper place unless a majordomo.cf file exists in which case the
-# majordomo.cf file will be used.
-# but now it won't overwrite an existing majordomo.cf file.
+# the install.cf target will install the sample config file in the proper
+# place unless a majordomo.cf file exists, in which case the majordomo.cf
+# file will be used. It won't overwrite an existing majordomo.cf file. In
+# all cases, the sample.cf file must be installed so that config-test will
+# be able to check for new variables.
install-cf:
@if [ ! -f $(W_BIN)/majordomo.cf ]; \
then \
if [ -f majordomo.cf ]; \
then \
echo "Using majordomo.cf"; \
- $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 644 majordomo.cf $(W_BIN)/majordomo.cf; \
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) majordomo.cf $(W_BIN)/majordomo.cf; \
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) sample.cf $(W_BIN)/sample.cf; \
else \
echo "Using sample.cf"; \
echo " Don't forget to edit $(W_BIN)/majordomo.cf !"; \
- $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 644 sample.cf $(W_BIN)/majordomo.cf; \
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) sample.cf $(W_BIN)/majordomo.cf; \
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) sample.cf $(W_BIN)/sample.cf; \
fi; \
else \
echo "Using installed majordomo.cf"; \
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) sample.cf $(W_BIN)/sample.cf; \
fi;
install-man:
@@ -177,11 +197,11 @@
@test -w $(MAN1) || (mkdir -p $(MAN1); \
chown $(W_USER) $(MAN1); chgrp $(W_GROUP) $(MAN1) )
@test -w $(MAN8) || (mkdir -p $(MAN8); \
- chown $(W_USER) $(MAN8); chgrp $(W_GROUP) $(MAN1) )
- @$(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 644 Doc/man/approve.1 $(MAN1)
- @$(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 644 Doc/man/digest.1 $(MAN1)
- @$(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 644 Doc/man/bounce-remind.1 $(MAN1)
- @$(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 644 Doc/man/majordomo.8 $(MAN1)
+ chown $(W_USER) $(MAN8); chgrp $(W_GROUP) $(MAN8) )
+ @$(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) Doc/man/approve.1 $(MAN1)
+ @$(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) Doc/man/digest.1 $(MAN1)
+ @$(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) Doc/man/bounce-remind.1 $(MAN1)
+ @$(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(FILE_CHMOD) Doc/man/majordomo.8 $(MAN1)
install-shared: install-wrapper-shared install-scripts
@@ -192,7 +212,7 @@
strip wrapper
$(INSTALL) -o $(WRAPPER_USER) -g $(W_GROUP) -m $(WRAPPER_CHMOD) wrapper $(W_BIN)/wrapper.$(ARCHCMD)
cp wrapper $(W_BIN)/wrappers/$(W_GROUP)/wrapper.$(ARCHCMD)
- $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m 755 wrapper.sh $(W_BIN)/wrapper
+ $(INSTALL) -o $(W_USER) -g $(W_GROUP) -m $(EXEC_CHMOD) wrapper.sh $(W_BIN)/wrapper
wrapper: wrapper.c
$(CC) $(WRAPPER_FLAGS) -o wrapper wrapper.c
- J<
Follow-Ups:
|
|