Commit b85fac36 authored by Slava Monich's avatar Slava Monich

Merge branch 'privileges' into 'master'

Make connectionagent privileged

See merge request !1
parents 33d9a34d 6f962a80
QT = core network dbus QT = core network dbus
TARGET = connectionagent TARGET = connectionagent
...@@ -16,16 +15,13 @@ CONFIG -= app_bundle ...@@ -16,16 +15,13 @@ CONFIG -= app_bundle
TEMPLATE = app TEMPLATE = app
OTHER_FILES += com.jolla.Connectiond.xml OTHER_FILES += com.jolla.Connectiond.xml privileges
DBUS_ADAPTORS = connadaptor DBUS_ADAPTORS = connadaptor
connadaptor.files = com.jollamobile.Connectiond.xml connadaptor.files = com.jollamobile.Connectiond.xml
connadaptor.header_flags = -c ConnAdaptor connadaptor.header_flags = -c ConnAdaptor
connadaptor.source_flags = -c ConnAdaptor connadaptor.source_flags = -c ConnAdaptor
# create adaptor
#system(qdbusxml2cpp -c ConnAdaptor -a connadaptor.h:connadaptor.cpp com.jollamobile.Connectiond.xml)
SOURCES += main.cpp \ SOURCES += main.cpp \
qconnectionagent.cpp \ qconnectionagent.cpp \
wakeupwatcher.cpp wakeupwatcher.cpp
...@@ -39,6 +35,3 @@ INSTALLS += target ...@@ -39,6 +35,3 @@ INSTALLS += target
MOC_DIR = .moc MOC_DIR = .moc
OBJECTS_DIR = .obj OBJECTS_DIR = .obj
# Tells invoker to run connectionagent as nemo:privileged
/usr/bin/connectionagent,
Name: connectionagent-qt5 Name: connectionagent-qt5
Summary: User Agent daemon Summary: User Agent daemon
Version: 0.11.25 Version: 0.11
Release: 0 Release: 0
Group: Communications/Connectivity Adaptation Group: Communications/Connectivity Adaptation
License: LGPLv2.1 License: LGPLv2.1
...@@ -75,6 +75,9 @@ rm -rf %{buildroot} ...@@ -75,6 +75,9 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
ln -s ../connectionagent.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/ ln -s ../connectionagent.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
mkdir -p %{buildroot}%{_datadir}/mapplauncherd/privileges.d
install -m 644 -p connd/privileges %{buildroot}%{_datadir}/mapplauncherd/privileges.d/connectionagent
%post %post
if [ "$1" -ge 1 ]; then if [ "$1" -ge 1 ]; then
systemctl-user daemon-reload || : systemctl-user daemon-reload || :
...@@ -91,6 +94,9 @@ fi ...@@ -91,6 +94,9 @@ fi
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/connectionagent %{_bindir}/connectionagent
%{_datadir}/dbus-1/services/com.jolla.Connectiond.service %{_datadir}/dbus-1/services/com.jolla.Connectiond.service
%dir %{_datadir}/mapplauncherd
%dir %{_datadir}/mapplauncherd/privileges.d
%{_datadir}/mapplauncherd/privileges.d/connectionagent
%{_libdir}/systemd/user/connectionagent.service %{_libdir}/systemd/user/connectionagent.service
%{_sysconfdir}/dbus-1/session.d/connectionagent.conf %{_sysconfdir}/dbus-1/session.d/connectionagent.conf
%{_libdir}/systemd/user/user-session.target.wants/connectionagent.service %{_libdir}/systemd/user/user-session.target.wants/connectionagent.service
......
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