Commit bc9579c7 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

configure: Add options --disable-setuid_fcgi & --disable-setuid_queue

parent 3f8449c6
......@@ -608,6 +608,30 @@ AC_ARG_WITH(
)
AC_SUBST(POSTMAP_ARG)
AC_MSG_CHECKING([whether we install setuid wrappers for web interface])
AC_ARG_ENABLE(
setuid_fcgi,
AS_HELP_STRING(
[--disable-setuid_fcgi],
[do not install setuid wrappers for web interface]
), ,
[enable_setuid_fcgi="yes"],
)
AC_MSG_RESULT([$enable_setuid_fcgi])
AM_CONDITIONAL(SETUID_FCGI, [test "x$enable_setuid_fcgi" = "xyes"])
AC_MSG_CHECKING([whether we set setuid bit of queue programs])
AC_ARG_ENABLE(
setuid_queue,
AS_HELP_STRING(
[--disable-setuid_queue],
[do not set setuid bit of queue programs]
), ,
[enable_setuid_queue="yes"],
)
AC_MSG_RESULT([$enable_setuid_queue])
AM_CONDITIONAL(SETUID_QUEUE, [test "x$enable_setuid_queue" = "xyes"])
AC_CONFIG_FILES([
Makefile
sympa.conf
......
......@@ -21,12 +21,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
execcgi_SCRIPTS = wwsympa.fcgi sympa_soap_server.fcgi
if SETUID_FCGI
execcgi_PROGRAMS = wwsympa-wrapper.fcgi sympa_soap_server-wrapper.fcgi
wwsympa_wrapper_fcgi_SOURCES = wwsympa-wrapper.fcgi.c
wwsympa_wrapper_fcgi_CPPFLAGS = -DWWSYMPA=\"$(execcgidir)/wwsympa.fcgi\"
sympa_soap_server_wrapper_fcgi_SOURCES = sympa_soap_server-wrapper.fcgi.c
sympa_soap_server_wrapper_fcgi_CPPFLAGS = \
-DSYMPASOAP=\"$(execcgidir)/sympa_soap_server.fcgi\"
endif
man8_MANS = \
wwsympa.8 \
......@@ -36,6 +38,7 @@ EXTRA_DIST = wwsympa.fcgi.in sympa_soap_server.fcgi.in
CLEANFILES = $(execcgi_SCRIPTS) $(man8_MANS)
if SETUID_FCGI
install-exec-hook:
-chown $(USER) $(DESTDIR)$(execcgidir)/wwsympa-wrapper.fcgi
-chgrp $(GROUP) $(DESTDIR)$(execcgidir)/wwsympa-wrapper.fcgi
......@@ -43,6 +46,7 @@ install-exec-hook:
-chown $(USER) $(DESTDIR)$(execcgidir)/sympa_soap_server-wrapper.fcgi
-chgrp $(GROUP) $(DESTDIR)$(execcgidir)/sympa_soap_server-wrapper.fcgi
chmod 6755 $(DESTDIR)$(execcgidir)/sympa_soap_server-wrapper.fcgi
endif
wwsympa.fcgi sympa_soap_server.fcgi: Makefile
@rm -f $@
......
......@@ -57,15 +57,28 @@ sympa_newaliases_wrapper_CPPFLAGS = $(AM_CPPFLAGS) \
install-exec-hook:
-chown $(USER) $(DESTDIR)$(libexecdir)/queue
-chgrp $(GROUP) $(DESTDIR)$(libexecdir)/queue
if SETUID_QUEUE
chmod 4755 $(DESTDIR)$(libexecdir)/queue
else
chmod 0755 $(DESTDIR)$(libexecdir)/queue
endif
-chown $(USER) $(DESTDIR)$(libexecdir)/bouncequeue
-chgrp $(GROUP) $(DESTDIR)$(libexecdir)/bouncequeue
if SETUID_QUEUE
chmod 4755 $(DESTDIR)$(libexecdir)/bouncequeue
else
chmod 0755 $(DESTDIR)$(libexecdir)/bouncequeue
endif
-chown $(USER) $(DESTDIR)$(libexecdir)/familyqueue
-chgrp $(GROUP) $(DESTDIR)$(libexecdir)/familyqueue
if SETUID_QUEUE
chmod 4755 $(DESTDIR)$(libexecdir)/familyqueue
else
chmod 0755 $(DESTDIR)$(libexecdir)/familyqueue
endif
if SMRSH
@echo 'Installing symbolic links for Sendmail smrsh'
$(INSTALL) -d -m 755 $(DESTDIR)$(smrshdir)
......
Markdown is supported
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