core: install correct dbus permissions for with-polkit/without-polkit

This commit is contained in:
Dan Williams
2010-02-27 06:25:45 -08:00
parent 438a047935
commit bffb332481
4 changed files with 30 additions and 2 deletions

1
.gitignore vendored
View File

@@ -23,6 +23,7 @@ libtool
*-glue.h
*.tar.bz2
org.freedesktop.ModemManager.service
org.freedesktop.ModemManager.conf
ModemManager.pc
marshallers/mm-marshal.[ch]
src/modem-manager

View File

@@ -28,6 +28,15 @@ endif
dbusservicedir = $(DBUS_SYS_DIR)
dbusservice_DATA = org.freedesktop.ModemManager.conf
dbusservice_file_polkit = org.freedesktop.ModemManager.conf.polkit
dbusservice_file_nopolkit = org.freedesktop.ModemManager.conf.nopolkit
if WITH_POLKIT
cp -f $(top_srcdir)/$(dbusservice_file_polkit) $(dbusservice_DATA)
else
cp -f $(top_srcdir)/$(dbusservice_file_nopolkit) $(dbusservice_DATA)
endif
dbusactivationdir = $(datadir)/dbus-1/system-services
dbusactivation_in_files = org.freedesktop.ModemManager.service.in
dbusactivation_DATA = $(dbusactivation_in_files:.service.in=.service)
@@ -57,8 +66,9 @@ DISTCLEANFILES = \
EXTRA_DIST = \
doc-generator.xsl \
$(dbusservice_DATA) \
$(dbusactivation_in_files) \
$(INTLTOOL_FILES)
$(INTLTOOL_FILES) \
$(dbusservice_file_polkit) \
$(dbusservice_file_nopolkit)
ACLOCAL_AMFLAGS = -I m4

View File

@@ -0,0 +1,17 @@
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- This config allows anyone to control ModemManager -->
<policy context="default">
<allow send_destination="org.freedesktop.ModemManager"/>
</policy>
<policy user="root">
<allow own="org.freedesktop.ModemManager"/>
</policy>
<limit name="max_replies_per_connection">512</limit>
</busconfig>