Commit 1790ad73 authored by david.verdin's avatar david.verdin
Browse files

***** C wrapper now for sympa_soap_server. We definitely disabled the setuid...

***** C wrapper now for sympa_soap_server. We definitely disabled the setuid solution to run sympa_soap_server.fcgi. If the script you used in your web server configuration was sympa_soap_server.fcgi (to whom you had attributed the "S" bit) you MUST change your Apache configuration so that the script you use becomes sympa_soap_server-wrapper.fcgi instead of sympa_soap_server.fcgi.


git-svn-id: https://subversion.renater.fr/sympa/trunk@4718 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent d227f83d
......@@ -160,7 +160,7 @@ main_SRC = AUTHORS COPYING ChangeLog INSTALL KNOWNBUGS NEWS README
LOG_SOCKET_TYPE = unix
#endif
all: warning checkperl checkcpan sources wrapper man locale
all: warning checkperl checkcpan sources wrapper soap_wrapper man locale
rpm: build_rh_rpm build_mdk_rpm
......@@ -233,6 +233,11 @@ wrapper: src/Makefile src/queue.c src/bouncequeue.c src/aliaswrapper.c
@(cd wwsympa && echo "making in wwsympa..." && \
$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' WWSYMPA='${CGIDIR}/wwsympa.fcgi');
soap_wrapper: src/Makefile src/queue.c src/bouncequeue.c src/aliaswrapper.c
@echo "Making sympa_soap"
@(cd soap && echo "making in soap..." && \
$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' SYMPASOAP='${CGIDIR}/sympa_soap_server.fcgi');
documentation: doc/sympa.tex.tpl doc/Makefile
@echo "Making documentation"
@(cd doc && echo "making in doc/..." && \
......
......@@ -508,7 +508,7 @@ ChangeLog:
@CVS2CL@
#endif
all: warning checkperl checkcpan sources wrapper man locale
all: warning checkperl checkcpan sources wrapper soap_wrapper man locale
rpm: build_rh_rpm build_mdk_rpm
......@@ -580,6 +580,11 @@ wrapper: src/Makefile src/queue.c src/bouncequeue.c src/aliaswrapper.c
@(cd wwsympa && echo "making in wwsympa..." && \
$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' WWSYMPA='${CGIDIR}/wwsympa.fcgi');
soap_wrapper: src/Makefile src/queue.c src/bouncequeue.c src/aliaswrapper.c
@echo "Making sympa_soap"
@(cd soap && echo "making in soap..." && \
$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' SYMPASOAP='${CGIDIR}/sympa_soap_server.fcgi');
documentation: doc/sympa.tex.tpl doc/Makefile
@echo "Making documentation"
@(cd doc && echo "making in doc/..." && \
......
......@@ -21,21 +21,26 @@
cgi_SUBST = sympa_soap_server.fcgi
cgi_SRC = sympa_soap_server-wrapper.fcgi
script_SUBST = sympa_soap_client.pl
lib_SUBST = sympasoap.pm SympaTransport.pm
SRC = sympa.wsdl
default: none
all: sympa_soap_server-wrapper.fcgi
clean:
rm -rf $(DESTDIR)$(SBINDIR)
@if [ -f ./sympa_soap_server-wrapper.fcgi ]; then \
rm -f sympa_soap_server-wrapper.fcgi ; \
fi
install:
echo "Please use the main Makefile for installing soapSympa."
newinstall: makedir $(cgi_SUBST) $(lib_SUBST) substcgi substlib substscript installsrc installmod
newinstall: makedir $(cgi_SUBST) $(lib_SUBST) substcgi substlib substscript installsrc installwrapper installmod
installmod:
@for i in $(SRC) ; do \
......@@ -51,9 +56,13 @@ installmod:
chown $(USER) $(DESTDIR)$(CGIDIR)/$$i; \
chgrp $(GROUP) $(DESTDIR)$(CGIDIR)/$$i; \
done
@echo "Setting SetUID bit on sympa_soap_server.fcgi..."
chmod u+s $(DESTDIR)$(CGIDIR)/sympa_soap_server.fcgi
chmod g+s $(DESTDIR)$(CGIDIR)/sympa_soap_server.fcgi
@for i in $(cgi_SRC) ; do \
chown $(USER) $(DESTDIR)$(CGIDIR)/$$i; \
chgrp $(GROUP) $(DESTDIR)$(CGIDIR)/$$i; \
done
@echo "Setting SetUID bit on sympa_soap_server-wrapper.fcgi..."
chmod u+s $(DESTDIR)$(CGIDIR)/sympa_soap_server-wrapper.fcgi
chmod g+s $(DESTDIR)$(CGIDIR)/sympa_soap_server-wrapper.fcgi
@for i in $(lib_SUBST) ; do \
chown $(USER) $(DESTDIR)$(LIBDIR)/$$i; \
chgrp $(GROUP) $(DESTDIR)$(LIBDIR)/$$i; \
......@@ -87,6 +96,10 @@ installsrc:
@echo "Installing sources..."
cp $(SRC) $(DESTDIR)$(ETCBINDIR)
installwrapper:
@echo "Installing sympa_soap_server-wrapper binary..."
cp sympa_soap_server-wrapper.fcgi $(DESTDIR)$(CGIDIR)/
substlib:
@echo "Doing multiple substitutions while installing librairies..."
@( \
......@@ -144,3 +157,5 @@ substcgi:
$(PERL) ../subst.pl $(cgi_SUBST) \
)
sympa_soap_server-wrapper.fcgi: sympa_soap_server-wrapper.fcgi.c Makefile ../Makefile
$(CC) $(CFLAGS) -DSYMPASOAP=\"$(SYMPASOAP)\" -o sympa_soap_server-wrapper.fcgi sympa_soap_server-wrapper.fcgi.c
#include <unistd.h>
int main(int argn, char **argv, char **envp) {
argv[0] = SYMPASOAP;
execve(SYMPASOAP,argv,envp);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment