Make geneweb.cgi suid again

This commit is contained in:
Neale Pickett 2010-06-09 00:04:13 -05:00
parent c126ef9c48
commit 6fc2cbd238
3 changed files with 17 additions and 2 deletions

View File

@ -8,7 +8,7 @@ HTML = index.html
# Things to copy
COPY += mdwntohtml template.xml
COPY += face.png geneweb.cgi chumby-photo.cgi
COPY += face.png chumby-photo.cgi
COPY += format.css default.css print.css
COPY += gitweb.cgi git-logo.png gitweb.css gitweb.conf
@ -16,7 +16,9 @@ COPY += gitweb.cgi git-logo.png gitweb.css gitweb.conf
PLAIN = . papers poems misc
# Other targets for "make all"
TARGETS = html copy $(DESTDIR)/tmp $(DESTDIR)/footer.xml $(DESTDIR)/projects
TARGETS = html copy
TARGETS += $(DESTDIR)/tmp $(DESTDIR)/footer.xml $(DESTDIR)/projects
TARGETS += $(DESTDIR)/geneweb.cgi
all: default
@ -39,6 +41,10 @@ $(DESTDIR)/footer.xml: $(TEMPLATE)
$(DESTDIR)/projects:
ln -s $(HOME)/projects $@
$(DESTDIR)/geneweb.cgi: geneweb.c
$(CC) -o $@ $<
chmod +s $@
default: $(TARGETS)
MDWN = $(wildcard $(addsuffix /*.mdwn, $(PLAIN)))

9
geneweb.c Normal file
View File

@ -0,0 +1,9 @@
#include <unistd.h>
int
main(int argc, char *argv[])
{
chdir("/home/neale/lib/geneweb");
execl("/usr/bin/gwd", "gwd", "-cgi", NULL);
return 0;
}

Binary file not shown.