From c920d465b4dc124f068bae0896a0e165c42d2ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 28 Aug 2015 13:22:23 +0200 Subject: [PATCH] spec: add nm-openvpn/n-openvpn user/group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is required to be able to run as non-root user. https://git.gnome.org/browse/network-manager-openvpn/commit/?h=nm-1-0&id=87631c2867f1102e365243fabb2828c8b4eac2cc http://fedoraproject.org/wiki/Packaging:UsersAndGroups Signed-off-by: Jiří Klimeš --- NetworkManager-openvpn.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NetworkManager-openvpn.spec b/NetworkManager-openvpn.spec index 0d56170..12eae00 100644 --- a/NetworkManager-openvpn.spec +++ b/NetworkManager-openvpn.spec @@ -24,6 +24,7 @@ Requires: gtk3 Requires: dbus Requires: NetworkManager Requires: openvpn +Requires(pre): shadow-utils Requires: shared-mime-info Obsoletes: NetworkManager-openvpn < 1:0.9.8.2-3 @@ -68,6 +69,13 @@ make %{?_smp_mflags} %check make check +%pre +getent group nm-openvpn >/dev/null || groupadd -r nm-openvpn +getent passwd nm-openvpn >/dev/null || \ + useradd -r -g nm-openvpn -d / -s /sbin/nologin \ + -c "Default user for running openvpn spawned by NetworkManager" nm-openvpn +exit 0 + %install make install DESTDIR=%{buildroot} INSTALL="%{__install} -p" @@ -90,6 +98,9 @@ rm -f %{buildroot}%{_libdir}/NetworkManager/lib*.la %{_datadir}/gnome-vpn-properties/openvpn/nm-openvpn-dialog.ui %changelog +* Fri Aug 28 2015 Lubomir Rintel - 1:1.0.6-3 +- Create an user for unprivileged runs + * Fri Aug 28 2015 Lubomir Rintel - 1:1.0.6-2 - Update the BRs