Make geneweb.cgi suid again
This commit is contained in:
parent
c126ef9c48
commit
6fc2cbd238
10
Makefile
10
Makefile
|
@ -8,7 +8,7 @@ HTML = index.html
|
||||||
|
|
||||||
# Things to copy
|
# Things to copy
|
||||||
COPY += mdwntohtml template.xml
|
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 += format.css default.css print.css
|
||||||
COPY += gitweb.cgi git-logo.png gitweb.css gitweb.conf
|
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
|
PLAIN = . papers poems misc
|
||||||
|
|
||||||
# Other targets for "make all"
|
# 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
|
all: default
|
||||||
|
|
||||||
|
@ -39,6 +41,10 @@ $(DESTDIR)/footer.xml: $(TEMPLATE)
|
||||||
$(DESTDIR)/projects:
|
$(DESTDIR)/projects:
|
||||||
ln -s $(HOME)/projects $@
|
ln -s $(HOME)/projects $@
|
||||||
|
|
||||||
|
$(DESTDIR)/geneweb.cgi: geneweb.c
|
||||||
|
$(CC) -o $@ $<
|
||||||
|
chmod +s $@
|
||||||
|
|
||||||
default: $(TARGETS)
|
default: $(TARGETS)
|
||||||
|
|
||||||
MDWN = $(wildcard $(addsuffix /*.mdwn, $(PLAIN)))
|
MDWN = $(wildcard $(addsuffix /*.mdwn, $(PLAIN)))
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
BIN
geneweb.cgi
BIN
geneweb.cgi
Binary file not shown.
Loading…
Reference in New Issue