Bug 694334

Summary: nm-connection-editor Crash
Product: [Fedora] Fedora Reporter: David Le Sage <dlesage>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: dcbw, dekela, ekanter, jklimes, michael
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 15:57:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Le Sage 2011-04-07 01:41:11 UTC
Description of problem:
If you try to import when running nm-connection-editor as root, the application crashes with this CLI output:

(nm-connection-editor:13167): GVFS-RemoteVolumeMonitor-WARNING **: cannot connect to the session bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.




Version-Release number of selected component (if applicable):
NetworkManager-0.8.998-1.fc15.x86_64

How reproducible:
Every time.

Steps to Reproduce:
1. Launch an xterm
2. su to root
3. nm-connection-editor
4. Go to VPN tab
5. Click "Import"

  
Actual results:
Crashes immediately

Expected results:
Should not crash

Additional info:

Comment 1 dekela 2011-04-24 11:27:36 UTC
I can confirm this bug also when trying to add Wireless or any other task.
Looks to be related to SELinux.

Any workaround?

Comment 2 Jirka Klimes 2011-05-11 08:10:19 UTC
That's not a problem of nm-connection-editor itself, rather a more general issue (or bad invocation) of desktop apps. Nowadays, (not only) desktop application extensively use D-Bus. And they make use of DBUS_SESSION_BUS_ADDRESS environment variable to find out where the session bus is.

When you run 'su', you change user to root, but all environment variables (including DBUS_SESSION_BUS_ADDRESS) are inherited from the shell, where you run 'su'. That's why applications executed after the 'su' see and use  DBUS_SESSION_BUS_ADDRESS of the previous user, which is not correct. So the solution is to run 'su -' or 'su -l', which will invoke login shell and as a result clears environment. Or it's possible to 'unset DBUS_SESSION_BUS_ADDRESS'. Example:
user $ su
root # unset DBUS_SESSION_BUS_ADDRESS
root # gnome-calculator

By the way, there is no need to run nm-connection-editor as root unless you really want to use that account (which you probably shouldn't).

Links:
- https://bugs.launchpad.net/ubuntu/+source/gconf/+bug/336660/comments/3
- info su
- man dbus-launch

Comment 3 Jirka Klimes 2011-06-20 07:51:33 UTC
*** Bug 714262 has been marked as a duplicate of this bug. ***

Comment 4 Eugene Kanter 2011-06-21 19:45:45 UTC
is it by design that nm-connection-editor is read only if launched by a user?
all previous Fedora releases did not have this "feature".
no new connection like vpn for example can be created unless started by a root user.

Comment 5 Jirka Klimes 2011-06-22 12:27:22 UTC
There's no such "feature".

Have you read comment #2?
It's a bad invocation. You should run "su -" instead of "su"

Comment 6 Eugene Kanter 2011-06-23 17:56:30 UTC
In Fedora 14 I was able to modify WI-FI connection routing table (stored in ~/.gconf/system/networking/connections/*/ipv4/%gconf.xml) by selecting edit connection from node manager icon.

In Fedora 15 the same dialog only accessible if nm-connection-editor started as root after "su -".

Let me repeat my question. Is the change above a new GNOME 3 "feature"?
Why would changing a user owned file requires root access?

Comment 7 Jirka Klimes 2011-06-24 07:16:19 UTC
You should be able edit connections as normal user. Running editor via Applications->Other->Network Connections (Gnome Shell) or in terminal nm-connection-editor.

It's not a new feature and you do not need run the editor as root. So, there are probably some permission issues. But your use case a bit different from this bug. Please, open a new bug and describe your case and your problems there. What do you see in the editor - grayed Edit button? And include any relevant information, as NetworkManager, Gnome versions, etc.

There's a change in F15 in that connections are not any more stored in gconf via client applets, but they are all managed by NM itself (and stored in /etc/sysconfig/network-scripts/ifcfg-*, route-*, keys-* or /etc/NetworkManager/system-connections/). However, it doesn't matter from user perspective and editing via the editor is available for the normal logged user without root access.

Comment 8 Fedora End Of Life 2012-08-07 15:57:46 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached 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 to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping