Bug 1377708 - Directory '/var/lib/openvpn/chroot' not usable for chroot by 'nm-openvpn'
Summary: Directory '/var/lib/openvpn/chroot' not usable for chroot by 'nm-openvpn'
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager-openvpn
Version: 24
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-20 12:29 UTC by Alvin
Modified: 2017-08-08 17:33 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-08-08 17:33:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alvin 2016-09-20 12:29:04 UTC
Description of problem:

OpenVPN connections are not chrooted.
Relevant log line when connecting to any OpenVPN server.
<warn>  Directory '/var/lib/openvpn/chroot' not usable for chroot by 'nm-openvpn', openvpn will not be chrooted.

Additional info:

Creating the directory /var/lib/openvpn/chroot and setting nm-openvpn as owner and group does not make a difference.
This probably also needs changes to the selinux configuration.

Comment 1 Thomas Haller 2016-09-20 12:38:59 UTC
for this to work, you also need a directory /var/lib/openvpn/chroot/tmp, see https://git.gnome.org/browse/network-manager-openvpn/tree/src/nm-openvpn-service.c?id=e1fa810171a6a46bde9752f00a96f590c53ccb62#n1079


I think, it's a bug (missing feature) in the Fedora package, which should create these directories on package install.

Comment 2 Thomas Haller 2016-09-20 13:21:39 UTC
there is also bug 922786 which seems related.

Comment 3 Thomas Haller 2016-09-20 13:29:01 UTC
I think upstream nm-openvpn plugin should get smarter and create the chroot environment as needed

Comment 4 Thomas Haller 2016-09-21 08:55:02 UTC
WIP at https://git.gnome.org/browse/network-manager-openvpn/commit/?h=th/chroot-rh1377708


I am not sure, that we can enable chroot in general.

Comment 5 Beniamino Galvani 2016-09-21 09:23:37 UTC
> service: create runstate dir for management socket

+static char *
+mgt_path_create (NMConnection *connection, GError **error)
+{
+       int errsv;
+       gs_free char *s = NULL;
+
+       /* Setup runtime directory */
+       if (g_mkdir_with_parents (RUNDIR, 0755) != 0) {
+               errsv = errno;
+               if (errsv != EEXIST) {

g_mkdir_with_parents() returns 0 if the directory already exists, so
this last check is not needed?

The rest (excluding last WIP commit) LGTM.

Comment 6 Fedora End Of Life 2017-07-25 23:09:29 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2017-08-08 17:33:01 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.