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