Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513202 - net-misc/networkmanager-openvpn-0.9.8.4 - add support to drop root privileges and chroot
Summary: net-misc/networkmanager-openvpn-0.9.8.4 - add support to drop root privileges...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Steev Klimaszewski (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-06-14 10:46 UTC by Matthias Maier
Modified: 2014-09-23 11:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against sources to add --user ... --group ... --chroot ... to the command line (0001-Add-uid-gid-and-chroot-separation.patch,861 bytes, patch)
2014-06-14 10:47 UTC, Matthias Maier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Maier gentoo-dev 2014-06-14 10:46:18 UTC
openvpn has a facility to drop root privileges and chroot to an empty directory after completed initialization. This is done be specifying
  "--user [...] --group [...] --chroot [...]"
on the command line.

However, the networkmanager plugin does not do this and always runs openvpn with full root privileges - while other networkmanager plugins drop root privileges (e.g. networkmanager-openconnect).

Please find attached a small patch (more a proof of concept) against the networkmanager-openvpn that adds above command line to the invocation of openvpn.


This should probably go along with a

     enewgroup nm-openvpn
     enewuser nm-openvpn -1 -1 -1 nm-openvpn

     + create chroot directory (e.g. /var/lib/openvpn/chroot)

in the appropriate ebuild phases.

Reproducible: Always
Comment 1 Matthias Maier gentoo-dev 2014-06-14 10:47:36 UTC
Created attachment 378862 [details, diff]
Patch against sources to add --user ... --group ... --chroot ... to the command line
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-06-18 03:22:36 UTC
Please submit this patch upstream to https://bugzilla.gnome.org/show_bug.cgi?id=555518
Comment 3 Pacho Ramos gentoo-dev 2014-09-23 11:59:56 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=555518#c3

Forwarded