Unverified Commit f2685185 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1032 from ikedas/issue-1031 by ikedas

Add option to ./configure which prevents installation of sympa_newaliases-wrapper (#1031)
parents a0a12991 a0cb7ef2
......@@ -608,6 +608,17 @@ AC_ARG_WITH(
)
AC_SUBST(POSTMAP_ARG)
AC_MSG_CHECKING([whether we install/enable setuid wrappers])
AC_ARG_ENABLE(
setuid,
AS_HELP_STRING(
[--disable-setuid],
[do not install nor enable any setuid wrappers]
), ,
[enable_setuid="yes"],
)
AC_MSG_RESULT([$enable_setuid])
AC_MSG_CHECKING([whether we install setuid wrappers for web interface])
AC_ARG_ENABLE(
setuid_fcgi,
......@@ -615,11 +626,23 @@ AC_ARG_ENABLE(
[--disable-setuid_fcgi],
[do not install setuid wrappers for web interface]
), ,
[enable_setuid_fcgi="yes"],
[enable_setuid_fcgi="$enable_setuid"],
)
AC_MSG_RESULT([$enable_setuid_fcgi])
AM_CONDITIONAL(SETUID_FCGI, [test "x$enable_setuid_fcgi" = "xyes"])
AC_MSG_CHECKING([whether we install setuid wrapper for alias maintenance])
AC_ARG_ENABLE(
setuid_newaliases,
AS_HELP_STRING(
[--disable-setuid_newaliases],
[do not install setuid wrappers for web interface]
), ,
[enable_setuid_newaliases="$enable_setuid"],
)
AC_MSG_RESULT([$enable_setuid_newaliases])
AM_CONDITIONAL(SETUID_NEWALIASES, [test "x$enable_setuid_newaliases" = "xyes"])
AC_MSG_CHECKING([whether we set setuid bit of queue programs])
AC_ARG_ENABLE(
setuid_queue,
......@@ -627,7 +650,7 @@ AC_ARG_ENABLE(
[--disable-setuid_queue],
[do not set setuid bit of queue programs]
), ,
[enable_setuid_queue="yes"],
[enable_setuid_queue="$enable_setuid"],
)
AC_MSG_RESULT([$enable_setuid_queue])
AM_CONDITIONAL(SETUID_QUEUE, [test "x$enable_setuid_queue" = "xyes"])
......
......@@ -38,14 +38,17 @@ EXTRA_DIST = wwsympa.fcgi.in sympa_soap_server.fcgi.in
CLEANFILES = $(execcgi_SCRIPTS) $(man8_MANS)
if SETUID_FCGI
install-exec-hook:
if SETUID_FCGI
-chown $(USER) $(DESTDIR)$(execcgidir)/wwsympa-wrapper.fcgi
-chgrp $(GROUP) $(DESTDIR)$(execcgidir)/wwsympa-wrapper.fcgi
chmod 6755 $(DESTDIR)$(execcgidir)/wwsympa-wrapper.fcgi
-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
else
-rm -f $(DESTDIR)$(execcgidir)/wwsympa-wrapper.fcgi
-rm -f $(DESTDIR)$(execcgidir)/sympa_soap_server-wrapper.fcgi
endif
wwsympa.fcgi sympa_soap_server.fcgi: Makefile
......
......@@ -37,7 +37,7 @@ EXTRA_DIST = alias_manager.pl.in \
#CLEANFILES = $(libexec_SCRIPTS) $(man8_MANS)
CLEANFILES = $(sbin_SCRIPTS) $(script_SCRIPTS) $(man8_MANS)
libexec_PROGRAMS = queue bouncequeue familyqueue sympa_newaliases-wrapper
libexec_PROGRAMS = queue bouncequeue familyqueue
AM_CPPFLAGS = -DCONFIG=\"$(CONFIG)\"
......@@ -50,9 +50,12 @@ bouncequeue_CPPFLAGS = $(AM_CPPFLAGS) -DSPOOLDIR=\"${spooldir}\"
familyqueue_SOURCES = familyqueue.c
familyqueue_CPPFLAGS = $(AM_CPPFLAGS) -DSPOOLDIR=\"${spooldir}\"
if SETUID_NEWALIASES
libexec_PROGRAMS += sympa_newaliases-wrapper
sympa_newaliases_wrapper_SOURCES = sympa_newaliases-wrapper.c
sympa_newaliases_wrapper_CPPFLAGS = $(AM_CPPFLAGS) \
-DSYMPA_NEWALIASES=\"${sbindir}/sympa_newaliases.pl\"
endif
install-exec-hook:
-chown $(USER) $(DESTDIR)$(libexecdir)/queue
......@@ -89,9 +92,14 @@ if SMRSH
-rm -f $(DESTDIR)$(smrshdir)/familyqueue
$(LN_S) $(libexecdir)/familyqueue $(DESTDIR)$(smrshdir)/familyqueue
endif
if SETUID_NEWALIASES
-chown root $(DESTDIR)$(libexecdir)/sympa_newaliases-wrapper
-chgrp $(GROUP) $(DESTDIR)$(libexecdir)/sympa_newaliases-wrapper
chmod 4750 $(DESTDIR)$(libexecdir)/sympa_newaliases-wrapper
else
-rm -f $(DESTDIR)$(libexecdir)/sympa_newaliases-wrapper
endif
alias_manager.pl ldap_alias_manager.pl mysql_alias_manager.pl: Makefile
@rm -f $@
......
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