summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2012-05-23 21:38:39 +0000
committerJoe Orton <jorton@apache.org>2012-05-23 21:38:39 +0000
commitbeaee8f4e3a275badb8239bf798379e0a8ad5de0 (patch)
treeaf9d06875cbd458486afdb8a67fc9320d8d026fd /Makefile.in
parentc82d3e4180e7fbc0783f306b53c877a4ac2f2ba0 (diff)
downloadhttpd-beaee8f4e3a275badb8239bf798379e0a8ad5de0.tar.gz
suexec: Support use of setgid/setuid capability bits on Linux, a
weaker set of privileges than the full setuid/setgid root binary. * configure.in: Add --enable-suexec-capabilites flag. * Makefile.in: If configured, use setcap instead of chmod 7555 on installed suexec binary. * modules/arch/unix/mod_unixd.c (unixd_pre_config): Drop test for setuid bit if capability bits are used. * docs/manual/: Add docs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1342065 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 31a59fc131..ad71290a58 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -233,11 +233,22 @@ install-man:
cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
fi
-install-suexec:
+install-suexec: install-suexec-binary install-suexec-$(INSTALL_SUEXEC)
+
+install-suexec-binary:
@if test -f $(builddir)/support/suexec; then \
test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \
$(INSTALL_PROGRAM) $(top_builddir)/support/suexec $(DESTDIR)$(sbindir); \
- chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
+ fi
+
+install-suexec-setuid:
+ @if test -f $(builddir)/support/suexec; then \
+ chmod 4755 $(DESTDIR)$(sbindir)/suexec; \
+ fi
+
+install-suexec-caps:
+ @if test -f $(builddir)/support/suexec; then \
+ setcap 'cap_setuid,cap_setgid+pe' $(DESTDIR)$(sbindir)/suexec; \
fi
suexec: