spec: add nm-openvpn/n-openvpn user/group

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š <jklimes@redhat.com>
epel8
Jiří Klimeš 9 years ago committed by Lubomir Rintel
parent 43ea22c920
commit c920d465b4

@ -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 <lkundrak@v3.sk> - 1:1.0.6-3
- Create an user for unprivileged runs
* Fri Aug 28 2015 Lubomir Rintel <lkundrak@v3.sk> - 1:1.0.6-2
- Update the BRs

Loading…
Cancel
Save