Opened 3 years ago

Last modified 3 years ago

#11068 new defect

olpc-netstatus prints Python/dbus error for Jabber when run as root

Reported by: skierpage Owned by: mstone
Priority: normal Milestone: Opportunity
Component: olpc-netutils Version: Development build as of this date
Keywords: Cc:
Blocked By: Blocking:
Deployments affected: Action Needed: never set
Verified: no

Description

I'm running build 873 (11.2.0 candidate) on XO-1.

If I run olpc-netstatus as root (or equivalently, run sudo olpc-netstatus), it prints my DNS, then there's a pause, then it prints "Jabber :" (skipping "Telepathy : salut"), then a long delay as it prints a Python Traceback, then it continues with "XOs : 0".

If I run it as user olpc, there's a delay but no traceback, and it continues with "XOs : 2". Maybe the command shouldn't be run as root.

The output is

DNS      :

Jabber   : 
Traceback (most recent call last):
  File "/usr/bin/sugar-xos", line 71, in <module>
    main()
  File "/usr/bin/sugar-xos", line 55, in main
    ps = bus.get_object(PRESENCE_SERVICE, PRESENCE_PATH)
  File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/bin/sugar-presence-service exited with status 1

Change History (1)

comment:1 Changed 3 years ago by dsd

  • Milestone changed from Not Triaged to Opportunity

Thanks for reporting. Similar to #9665.

Yes, these commands can definitely only be run as user olpc within the sugar env, at least until we have some kind of workaround in place (which seems unlikely to happen in the absence of a clean/unintrusive way to do it). In the mean time, perhaps we should make these commands do basic user/env sanity checks, bailing out if run in the wrong environment or as root, to avoid confusion such as this. patches accepted :)

Note: See TracTickets for help on using tickets.