Skip to content

Commit

Permalink
Merge branch 'encrypted-home' into 'master'
Browse files Browse the repository at this point in the history
[devicelock] Add a device lock daemon Fixes MER#1663

See merge request !2
  • Loading branch information
adenexter committed Jan 31, 2017
2 parents 88342ae + 2e73451 commit ce432f4
Show file tree
Hide file tree
Showing 104 changed files with 7,915 additions and 1,483 deletions.
14 changes: 14 additions & 0 deletions dbus/dbus.pri
@@ -0,0 +1,14 @@
OTHER_FILES += \
$$PWD/org.nemomobile.devicelock.Authenticator.xml \
$$PWD/org.nemomobile.devicelock.Authorization.xml \
$$PWD/org.nemomobile.devicelock.client.Authenticator.xml \
$$PWD/org.nemomobile.devicelock.client.Authorization.xml \
$$PWD/org.nemomobile.devicelock.client.Fingerprint.Sensor.xml \
$$PWD/org.nemomobile.devicelock.DeviceLock.xml \
$$PWD/org.nemomobile.devicelock.DeviceLock.Settings.xml \
$$PWD/org.nemomobile.devicelock.DeviceReset.xml \
$$PWD/org.nemomobile.devicelock.EncryptionSettings.xml \
$$PWD/org.nemomobile.devicelock.Fingerprint.Sensor.xml \
$$PWD/org.nemomobile.devicelock.Fingerprint.Settings.xml \
$$PWD/org.nemomobile.devicelock.LockCodeSettings.xml

21 changes: 21 additions & 0 deletions dbus/org.nemomobile.devicelock.AuthenticationInput.xml
@@ -0,0 +1,21 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.nemomobile.devicelock.AuthenticationInput">
<method name="SetRegistered">
<arg name="client" type="o" direction="in"/>
<arg name="registered" type="b" direction="in"/>
</method>
<method name="SetActive">
<arg name="client" type="o" direction="in"/>
<arg name="active" type="b" direction="in"/>
</method>
<method name="EnterSecurityCode">
<arg name="client" type="o" direction="in"/>
<arg name="code" type="s" direction="in"/>
</method>
<method name="Cancel">
<arg name="client" type="o" direction="in"/>
</method>
</interface>
</node>
15 changes: 15 additions & 0 deletions dbus/org.nemomobile.devicelock.Authenticator.xml
@@ -0,0 +1,15 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/authenticator">
<interface name="org.nemomobile.devicelock.Authenticator">
<property name="AvailableMethods" type="u" access="read"/>
<method name="Authenticate">
<arg name="client" type="o" direction="in"/>
<arg name="challenge_code" type="v" direction="in"/>
<arg name="methods" type="u" direction="in"/>
</method>
<method name="Cancel">
<arg name="client" type="o" direction="in"/>
</method>
</interface>
</node>
14 changes: 14 additions & 0 deletions dbus/org.nemomobile.devicelock.Authorization.xml
@@ -0,0 +1,14 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.nemomobile.devicelock.Authorization">
<method name="RequestChallenge">
<arg name="client" type="o" direction="in"/>
<arg name="challenge_code" type="v" direction="out"/>
<arg name="allowed_methods" type="u" direction="out"/>
</method>
<method name="RelinquishChallenge">
<arg name="client" type="o" direction="in"/>
</method>
</interface>
</node>
12 changes: 12 additions & 0 deletions dbus/org.nemomobile.devicelock.DeviceLock.Settings.xml
@@ -0,0 +1,12 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/devicelock/settings">
<interface name="org.nemomobile.devicelock.DeviceLock.Settings">
<method name="ChangeSetting">
<arg name="client" type="o" direction="in"/>
<arg name="authentication_token" type="v" direction="in"/>
<arg name="key" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
</interface>
</node>
11 changes: 11 additions & 0 deletions dbus/org.nemomobile.devicelock.DeviceLock.xml
@@ -0,0 +1,11 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/devicelock">
<interface name="org.nemomobile.devicelock.DeviceLock">
<property name="State" type="u" access="read"/>
<property name="Enabled" type="b" access="read"/>
<property name="Unlocking" type="b" access="read"/>
<method name="Unlock"/>
<method name="Cancel"/>
</interface>
</node>
11 changes: 11 additions & 0 deletions dbus/org.nemomobile.devicelock.DeviceReset.xml
@@ -0,0 +1,11 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/devicereset">
<interface name="org.nemomobile.devicelock.DeviceReset">
<method name="ClearDevice">
<arg name="client" type="o" direction="in"/>
<arg name="authentication_token" type="v" direction="in"/>
<arg name="mode" type="u" direction="in"/>
</method>
</interface>
</node>
11 changes: 11 additions & 0 deletions dbus/org.nemomobile.devicelock.EncryptionSettings.xml
@@ -0,0 +1,11 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/encryption">
<interface name="org.nemomobile.devicelock.EncryptionSettings">
<property name="Supported" type="b" access="read"/>
<method name="EncryptHome">
<arg name="client" type="o" direction="in"/>
<arg name="authentication_token" type="v" direction="in"/>
</method>
</interface>
</node>
15 changes: 15 additions & 0 deletions dbus/org.nemomobile.devicelock.Fingerprint.Sensor.xml
@@ -0,0 +1,15 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/fingerprint/sensor">
<interface name="org.nemomobile.devicelock.Fingerprint.Sensor">
<property name="HasSensor" type="b" access="read"/>
<method name="AcquireFinger">
<arg name="client" type="o" direction="in"/>
<arg name="authentication_token" type="v" direction="in"/>
<arg name="samples_required" type="u" direction="out"/>
</method>
<method name="CancelAcquisition">
<arg name="client" type="o" direction="in"/>
</method>
</interface>
</node>
16 changes: 16 additions & 0 deletions dbus/org.nemomobile.devicelock.Fingerprint.Settings.xml
@@ -0,0 +1,16 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/fingerprint/settings">
<interface name="org.nemomobile.devicelock.Fingerprint.Settings">
<property name="Fingerprints" type="a{vss}" access="read"/>
<method name="Remove">
<arg name="client" type="o" direction="in"/>
<arg name="authentication_token" type="v" direction="in"/>
<arg name="id" type="v" direction="in"/>
</method>
<method name="Rename">
<arg name="id" type="v" direction="in"/>
<arg name="name" type="s" direction="in"/>
</method>
</interface>
</node>
20 changes: 20 additions & 0 deletions dbus/org.nemomobile.devicelock.SecurityCodeSettings.xml
@@ -0,0 +1,20 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/authenticator">
<interface name="org.nemomobile.devicelock.SecurityCodeSettings">
<property name="SecurityCodeSet" type="b"/>
<method name="Change">
<arg name="client" type="o" direction="in"/>
<arg name="challenge_code" type="v" direction="in"/>
</method>
<method name="CancelChange">
<arg name="client" type="o" direction="in"/>
</method>
<method name="Clear">
<arg name="code" type="s" direction="in"/>
</method>
<method name="CancelClear">
<arg name="client" type="o" direction="in"/>
</method>
</interface>
</node>
32 changes: 32 additions & 0 deletions dbus/org.nemomobile.devicelock.client.AuthenticationInput.xml
@@ -0,0 +1,32 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.nemomobile.devicelock.client.AuthenticationInput">
<method name="AuthenticationStarted">
<arg name="pid" type="u" direction="in"/>
<arg name="utilized_methods" type="u" direction="in"/>
<arg name="instruction" type="u" direction="in"/>
</method>
<method name="AuthenticationUnavailable">
<arg name="pid" type="u" direction="in"/>
<arg name="error" type="u" direction="in"/>
</method>
<method name="AuthenticationEvaluating"/>
<method name="AuthenticationProgress">
<arg name="current" type="u" direction="in"/>
<arg name="maximum" type="u" direction="in"/>
</method>
<method name="AuthenticationResumed">
<arg name="utilized_methods" type="u" direction="in"/>
<arg name="instruction" type="u" direction="in"/>
</method>
<method name="Feedback">
<arg name="feedback" type="u" direction="in"/>
<arg name="attempts_remaining" type="u" direction="in"/>
<arg name="utilized_methods" type="u" direction="in"/>
</method>
<method name="Error">
<arg name="error" type="u" direction="in"/>
</method>
</interface>
</node>
10 changes: 10 additions & 0 deletions dbus/org.nemomobile.devicelock.client.Authenticator.xml
@@ -0,0 +1,10 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.nemomobile.devicelock.client.Authenticator">
<method name="Authenticated">
<arg name="authentication_token" type="v" direction="in"/>
</method>
<method name="Aborted"/>
</interface>
</node>
7 changes: 7 additions & 0 deletions dbus/org.nemomobile.devicelock.client.Authorization.xml
@@ -0,0 +1,7 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.nemomobile.devicelock.client.Authorization">
<method name="ChallengeExpired" />
</interface>
</node>
16 changes: 16 additions & 0 deletions dbus/org.nemomobile.devicelock.client.Fingerprint.Sensor.xml
@@ -0,0 +1,16 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.nemomobile.devicelock.client.Fingerprint.Sensor">
<method name="SampleAcquired">
<arg name="samples_remaining" type="u" direction="in"/>
</method>
<method name="AcquisitionCompleted"/>
<method name="AcquisitionFeedback">
<arg name="feedback" type="u" direction="in"/>
</method>
<method name="AcquisitionError">
<arg name="error" type="u" direction="in"/>
</method>
</interface>
</node>
12 changes: 12 additions & 0 deletions dbus/org.nemomobile.devicelock.client.SecurityCodeSettings.xml
@@ -0,0 +1,12 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.nemomobile.devicelock.client.SecurityCodeSettings">
<method name="Changed">
<arg name="authentication_token" type="v" direction="in"/>
</method>
<method name="ChangeAborted"/>
<method name="Cleared"/>
<method name="ClearAborted"/>
</interface>
</node>
3 changes: 3 additions & 0 deletions nemo-qml-plugin-devicelock.pro
Expand Up @@ -5,3 +5,6 @@ SUBDIRS = \

OTHER_FILES += \
rpm/nemo-qml-plugin-devicelock.spec

include (dbus/dbus.pri)
include (systemd/systemd.pri)
78 changes: 55 additions & 23 deletions rpm/nemo-qml-plugin-devicelock.spec
Expand Up @@ -11,27 +11,46 @@ BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(keepalive)
BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: pkgconfig(mce)
BuildRequires: pkgconfig(mlite5)
BuildRequires: pkgconfig(nemodbus)
Obsoletes: nemo-qml-plugin-devicelock-default < 0.2.0
Requires: nemo-devicelock-daemon

%description
%{summary}.

%package default
Summary: The default lock code based device lock plugin for Nemo Mobile
%package -n nemo-devicelock-daemon-cli
Summary: The default command line lock code device lock daemon for Nemo Mobile
Group: System/GUI/Other
Provides: nemo-qml-plugin-devicelock = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Provides: nemo-devicelock-daemon = %{version}-%{release}

%description default
%description -n nemo-devicelock-daemon-cli
%{summary}.

%package devel
Summary: Development libraries for device lock QML plugins
Summary: Development libraries for device lock
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig(nemodbus)

%description devel
%{summary}.

%package host-devel
Summary: Development libraries for device lock daemons
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: nemo-devicelock-daemon-cli = %{version}-%{release}
Requires: pkgconfig(keepalive)
Requires: pkgconfig(libsystemd-daemon)
Requires: pkgconfig(mce)
Requires: pkgconfig(nemodbus)

%description host-devel
%{summary}.

%prep
%setup -q -n %{name}-%{version}

Expand All @@ -43,27 +62,40 @@ make %{?jobs:-j%jobs}
rm -rf %{buildroot}
%qmake5_install

%files default
mkdir -p %{buildroot}/lib/systemd/system/multi-user.target.wants
ln -sf ../nemo-devicelock.socket %{buildroot}/lib/systemd/system/multi-user.target.wants/

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_libdir}/libnemodevicelock.so.*
%dir %{_libdir}/qt5/qml/org/nemomobile/devicelock
%{_libdir}/qt5/qml/org/nemomobile/devicelock/libnemodevicelockplugin.so
%{_libdir}/qt5/qml/org/nemomobile/devicelock/qmldir
/lib/systemd/system/nemo-devicelock.socket
/lib/systemd/system/multi-user.target.wants/nemo-devicelock.socket
%config %{_sysconfdir}/dbus-1/system.d/org.nemomobile.devicelock.conf

%files -n nemo-devicelock-daemon-cli
%defattr(-,root,root,-)
%{_libexecdir}/nemo-devicelock
/lib/systemd/system/nemo-devicelock.service

%files devel
%{_includedir}/nemo-devicelock/authorization.h
%{_includedir}/nemo-devicelock/authenticator.h
%{_includedir}/nemo-devicelock/devicelock.h
%{_includedir}/nemo-devicelock/devicelocksettings.h
%{_includedir}/nemo-devicelock/devicereset.h
%{_includedir}/nemo-devicelock/fingerprintsettings.h
%{_includedir}/nemo-devicelock/lockcodesettings.h
%{_includedir}/nemo-devicelock/nemoauthenticator.h
%{_includedir}/nemo-devicelock/nemoauthorization.h
%{_includedir}/nemo-devicelock/nemodevicelock.h
%{_includedir}/nemo-devicelock/nemodevicelocksettings.h
%{_includedir}/nemo-devicelock/nemodevicereset.h
%{_includedir}/nemo-devicelock/nemofingerprintsettings.h
%{_includedir}/nemo-devicelock/nemolockcodesettings.h
%{_includedir}/nemo-devicelock/mcedevicelock.h
%{_libdir}/libnemodevicelock.a
%defattr(-,root,root,-)
%dir %{_includedir}/nemo-devicelock
%{_includedir}/nemo-devicelock/*.h
%{_includedir}/nemo-devicelock/private/*.h
%{_includedir}/nemo-devicelock/host/*.h
%{_libdir}/libnemodevicelock.so
%{_libdir}/pkgconfig/nemodevicelock.pc

%files host-devel
%defattr(-,root,root,-)
%dir %{_includedir}/nemo-devicelock/host
%{_includedir}/nemo-devicelock/host/*.h
%{_libdir}/libnemodevicelock-host.a
%{_datadir}/qt5/mkspecs/features/nemo-devicelock-host.prf

0 comments on commit ce432f4

Please sign in to comment.