summaryrefslogtreecommitdiff
path: root/tools/makefile
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-31 13:12:26 -0700
committerJohn Denker <jsd@av8n.com>2012-07-31 14:34:25 -0700
commit158def7ed5c5100456d05150670cfebc3bc2ddd1 (patch)
treed7ccefab5c44dd705e977e7bdd8f4bccd490b9da /tools/makefile
parent6b22bf70dbdffb38b58e6b69421d432651680a71 (diff)
more-or-less secure way to use setuid features
Diffstat (limited to 'tools/makefile')
-rw-r--r--tools/makefile23
1 files changed, 18 insertions, 5 deletions
diff --git a/tools/makefile b/tools/makefile
index 6594ca8..723d756 100644
--- a/tools/makefile
+++ b/tools/makefile
@@ -1,5 +1,5 @@
-CC= /usr/bin/g++ -Wall -g -I $(HOME)/lib/include
-
+CC= /usr/bin/g++
+CFLAGS = -std=gnu++0x -Wall -g -I $(HOME)/lib/include
#?? exhibits = checkpassword.patch hi-q.c pido.c pop3.conf smtp.conf \
#?? smtp.rules spamc-zap.patch spamd qmail
@@ -15,7 +15,7 @@ qmain = pido.c hi-q.c skrewt.c hi-test.c mail-scan.c greylist.c wripper.c
qprogs = $(qmain:%.c=%)
# sources for other main programs:
-moremain = wripper.c bash-c.c ltgrey.c
+moremain = wripper.c bash-c.c ltgrey.c fixown.c
moreprogs = $(moremain:%.c=%)
nonmain = libltgrey.c
@@ -32,23 +32,36 @@ beware_other = checkpassword.c spamc.c
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
-all: $(qprogs) $(moreprogs)
+all: $(qprogs) $(moreprogs) fixown2
show:
: --- $(qprogs) +++ $(moreprogs)
+fixown: fixown.o utils.o
+ $(CC) $^ -o $@
+ chmod o-rwx $@
+ ./fixown2 $@
+
+fixown2: fixown.o utils.o
+ $(CC) $^ -o $@
+ chmod o-rwx $@
+ ./fixown $@
+
skrewt: skrewt.o utils.o
$(CC) $^ -lboost_filesystem-mt -lboost_system -o $@
+ ./fixown $@
greylist: greylist.o utils.o
$(CC) $^ -lboost_filesystem-mt -lboost_system -o $@
+ ./fixown $@
ltgrey: ltgrey.o utils.o libltgrey.o
$(CC) $^ -lboost_filesystem-mt -lboost_system -o $@
+ ./fixown $@
wripper: wripper.o
$(CC) $^ -o $@
- chgrp daemon $@ && chmod g+s $@ || true
+ ./fixown $@
mail-scan: mail-scan.o utils.o
$(CC) $^ -lboost_regex -o $@