summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorPrzemyslaw Kedzierski <p.kedzierski@samsung.com>2014-12-09 12:17:24 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-09 18:23:24 +0100
commitdd5ae4c36c89da5dbe8d1628939b26c00db98753 (patch)
tree70732de11f8d613b3c3a5117009f9802301774e7 /Makefile.am
parent4c213d6cf416917c61f82d8bee795b8f3a4c5372 (diff)
downloadsystemd-dd5ae4c36c89da5dbe8d1628939b26c00db98753.tar.gz
bus-proxy: cloning smack label
When dbus client connects to systemd-bus-proxyd through Unix domain socket proxy takes client's smack label and sets for itself. It is done before and independent of dropping privileges. The reason of such soluton is fact that tests of access rights performed by lsm may take place inside kernel, not only in userspace of recipient of message. The bus-proxyd needs CAP_MAC_ADMIN to manipulate its label. In case of systemd running in system mode, CAP_MAC_ADMIN should be added to CapabilityBoundingSet in service file of bus-proxyd. In case of systemd running in user mode ('systemd --user') it can be achieved by addition Capabilities=cap_mac_admin=i and SecureBits=keep-caps to user@.service file and setting cap_mac_admin+ei on bus-proxyd binary.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 7b43733eb1..78cf4a94f0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -591,7 +591,7 @@ EXTRA_DIST += \
units/systemd-fsck@.service.in \
units/systemd-fsck-root.service.in \
units/systemd-machine-id-commit.service.in \
- units/user@.service.in \
+ units/user@.service.m4.in \
units/debug-shell.service.in \
units/systemd-suspend.service.in \
units/quotaon.service.in \
@@ -2579,9 +2579,16 @@ dist_userunit_DATA += \
endif
EXTRA_DIST += \
- units/systemd-bus-proxyd@.service.in \
+ units/systemd-bus-proxyd@.service.m4.in \
units/user/systemd-bus-proxyd@.service.in
+if HAVE_SMACK
+bus-proxyd-set-cap-hook:
+ $(SETCAP) cap_mac_admin+ei $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd
+
+INSTALL_EXEC_HOOKS += bus-proxyd-set-cap-hook
+endif
+
# ------------------------------------------------------------------------------
systemd_tty_ask_password_agent_SOURCES = \
src/tty-ask-password-agent/tty-ask-password-agent.c