Opened 14 years ago

Closed 9 years ago

#26453 closed defect (worksforme)

DBus connections are broken under root user.

Reported by: andyjstormont@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc:
Port: dbus

Description

I'm trying to port PackageKit to OSX and I've come across an annoying problem. When a program running as root attempts to open a connection to the system bus DBus prints out some gobbledegook about the session daemon (not what I want) and returns an 'not enough memory'. When I run the program as an unprivileged user there are no dbus errors but the program cannot function correctly since it was designed to run as root.

Example with PackageKit:

andy$ sudo /opt/local/libexec/packagekitd -vTI:21:26:25 FI:egg-dbus-monitor.c FN:egg_dbus_monitor_assign,136

  • connecting new DBUS_BUS_SYSTEM monitor

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded! TI:21:26:25 FI:egg-dbus-monitor.c FN:egg_dbus_monitor_assign,140

  • Cannot connect to bus: Not enough memory
  • (packagekitd:25722): CRITICAL : dbus_g_connection_get_connection: assertion `gconnection' failed

process 25722: arguments to dbus_bus_name_has_owner() were incorrect, assertion "connection != NULL" failed in file dbus-bus.c line 1278. This is normally a bug in some application using the D-Bus library.

D-Bus not built with -rdynamic so unable to print a backtrace

Abort trap

So there is a problem with dbus when running under root user which may or may not be limited to the system bus. Please help :(

Change History (3)

comment:1 Changed 14 years ago by andyjstormont@…

Cc: andyjstormont@… added

Cc Me!

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Cc: andyjstormont@… removed
Owner: changed from macports-tickets@… to mcalhoun@…
Port: dbus added
Priority: HighNormal

Please remember to fill in the Port field and cc the maintainer, and note that you do not need to be in cc when you are the reporter. As per the ticket guidelines, the High priority is reserved for the use of MacPorts team members.

comment:3 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: worksforme
Status: newclosed

dbus has undergone numerous revisions since this ticket was opened (apologies for never acknowledging).
I have never encountered this problem.
Closing now with the hope that the problem has been solved in the interim.
We can reassess if there is still a problem.

Note: See TracTickets for help on using tickets.