Bug 655751

Summary: gdbus aborting due to unauthorized socket in DBUS_SESSION_BUS_ADDRESS
Product: [openSUSE] openSUSE 11.4 Reporter: Forgotten User cAXlJ_FoSf <forgotten_cAXlJ_FoSf>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P2 - High CC: aj, arun, caf4926, cedric, fedev, forgotten_h13THG8RK1, jslaby, koenig, Martin.Seidler, terjejhanssen
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: Other   
Whiteboard: maint:released:11.4:42528
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: minimal example to trigger the bug

Description Forgotten User cAXlJ_FoSf 2010-11-24 14:39:12 UTC
Created attachment 402008 [details]
 minimal example to trigger the bug

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10

When DBUS_SESSION_BUS_ADDRESS is set to the valid socket of another user glib
will abort due to an assertion failure when more than one connection attempt
via gdbus is made. In practice this often happens when users try to execute GTK
applications which use GConf through su/sudo without properly clearing the
environment (e.g. starting YaST with xdg-su xterm+su).
A minimal example which triggers the problem is attached.

This bug affects glib2 verion 2.27.x in Factory, openSUSE 11.3 is not affected since it uses an older glib version without GDBus. The bug has been reported upstream: https://bugzilla.gnome.org/show_bug.cgi?id=635694

Backtrace:
Starting program: /home/gber/gdbus-test 
[New Thread 0xb7b3bb70 (LWP 24927)]

Program received signal SIGABRT, Aborted.
0xffffe430 in __kernel_vsyscall ()
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb7bf37cf in raise () from /lib/libc.so.6
#2  0xb7bf5110 in abort () from /lib/libc.so.6
#3  0xb7db8132 in g_assertion_message (domain=0xb7f7f1e1 "GLib-GIO", file=0xb7f96c19 "gdbusconnection.c", 
    line=2152, func=0xb7f98c68 "initable_init", message=<value optimized out>) at gtestutils.c:1358
#4  0xb7db875f in g_assertion_message_expr (domain=0xb7f7f1e1 "GLib-GIO", file=
    0xb7f96c19 "gdbusconnection.c", line=2152, func=0xb7f98c68 "initable_init", expr=
    0xb7f98314 "connection->initialization_error == NULL") at gtestutils.c:1369
#5  0xb7f4f41b in initable_init (initable=0x8055000, cancellable=0x0, error=0xbffff278)
    at gdbusconnection.c:2152
#6  0xb7ef2822 in g_initable_init (initable=0x8055000, cancellable=0x0, error=0xbffff278) at ginitable.c:105
#7  0xb7f4fc65 in g_bus_get_sync (bus_type=G_BUS_TYPE_SESSION, cancellable=0x0, error=0xbffff278)
    at gdbusconnection.c:6121
#8  0x080486f8 in try_connect () at gdbus-test.c:14
#9  0x08048755 in main (argc=1, argv=0xbffff344) at gdbus-test.c:36
A debugging session is active.

	Inferior 1 [process 24924] will be killed.

Quit anyway? (y or n) 


Reproducible: Always

Steps to Reproduce:
1. point DBUS_SESSION_BUS_ADDRESS to the valid socket of another user
2. execute the attached example
Comment 1 Forgotten User cAXlJ_FoSf 2010-11-24 14:42:20 UTC
*** Bug 648558 has been marked as a duplicate of this bug. ***
Comment 2 Vincent Untz 2011-03-10 09:47:20 UTC
*** Bug 672793 has been marked as a duplicate of this bug. ***
Comment 3 Forgotten User nWM7y1foa6 2011-03-14 17:09:53 UTC
Fresh install of 11.4, and I receive this error when trying to launch yast as root from a shell


GLib-GIO:ERROR:gdbusconnection.c:2279:initable_init: assertion failed: (connection->initialization_error == NULL)

I can get you a supportconfig if desired.
Comment 4 Jeremy Meldrum 2011-03-15 16:41:42 UTC
I also see the same issue and can get you whatever you need.
Comment 5 Martin Seidler 2011-03-16 21:22:53 UTC
Is the issue described in
Thread: After zypper dup to 11.4 , most of the (graphical) YaST modules do not start via YaST
http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/455279-after-zypper-dup-11-4-most-graphical-yast-modules-do-not-start-via-yast-post2306145.html#post2306145
a result of the issue of this bugreport?

Should I open a new bugreport or do anything to give data to the bugreport 655751 here?

If it would be only me and my former factory-tested installation I would just make a fresh reinstall. I the forums have tree other users written that they have the same issue.

Regards
Martin
(pistazienfresser)
Comment 6 Forgotten User h13THG8RK1 2011-03-16 22:18:37 UTC
Martin: please try if the other plugins (ncurses, qt) work for you.
Comment 7 Forgotten User cAXlJ_FoSf 2011-03-16 23:02:30 UTC
(In reply to comment #5)
> http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/455279-after-zypper-dup-11-4-most-graphical-yast-modules-do-not-start-via-yast-post2306145.html#post2306145
> a result of the issue of this bugreport?

That seems to be a separate bug in xdg-su (which like the other xdg-* stuff is total crap) triggering this one. It does some guesswork on what the current desktop is and falls back to calling an xterm with su, of course without properly requesting a login shell.
Comment 8 Forgotten User cAXlJ_FoSf 2011-03-16 23:08:35 UTC
(In reply to comment #3)
> Fresh install of 11.4, and I receive this error when trying to launch yast as
> root from a shell
> 
> 
> GLib-GIO:ERROR:gdbusconnection.c:2279:initable_init: assertion failed:
> (connection->initialization_error == NULL)
> 
> I can get you a supportconfig if desired.

Anyone running into this is doing something wrong anyway, if you properly log in as root or request a login shell with su via "-" or "-l" you should not see this.

No more data is needed, a backtrace is already on this and the upstream report.
Comment 9 Forgotten User nWM7y1foa6 2011-03-17 17:59:44 UTC
You are right.  I wasn't using "-" before.  I tested it and it worked.  While I k now that is the standard way of doing things, previous versions of Suse didn't require it--made me lazy I guess.
Comment 10 Forgotten User cAXlJ_FoSf 2011-03-17 18:51:17 UTC
(In reply to comment #9)
> You are right.  I wasn't using "-" before.  I tested it and it worked.  While I
> k now that is the standard way of doing things, previous versions of Suse
> didn't require it--made me lazy I guess.

You shouldn't do that, GNU coreutils su has in contrast to other implementations like Solaris su no security precautions at all and if you don't request a login shell, $PATH and any $LD_* variables are happily passed along. But this is getting offtopic, this bug is about glib not handling an invalid $DBUS_SESSION_BUS_ADDRESS gracefully.
Comment 11 Martin Seidler 2011-03-22 14:34:47 UTC
(In reply to comment #6)
> Martin: please try if the other plugins (ncurses, qt) work for you.
Thanks, Ricardo.
Yes. they are working. Also are the YaST modules working properly if I start them individually and with gnomesu instead of 
Compare:
Bug 681078 - xdg-utils: calling xdg-su inside "su -" fails
formerly known as:
Bug 681078 - yast2-control-center-gnome: After zypper dup to 11.4, most of the (graphical) YaST modules do not start via YaST on GNOME
Regards
Martin
(pistazienfresser)
Comment 12 Martin Seidler 2011-03-25 17:10:02 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > You are right.  I wasn't using "-" before.  I tested it and it worked.  While I
> > k now that is the standard way of doing things, previous versions of Suse
> > didn't require it--made me lazy I guess.
> 
> You shouldn't do that, GNU coreutils su has in contrast to other
> implementations like Solaris su no security precautions at all and if you don't
> request a login shell, $PATH and any $LD_* variables are happily passed along.
> But this is getting offtopic, this bug is about glib not handling an invalid
> $DBUS_SESSION_BUS_ADDRESS gracefully.

Compare:
Bug 682726 - Reference suggests only "su" instead of "su -"/su -l/su --login "make the shell a login shell"
Comment 13 Ryan Bach 2011-04-09 03:48:52 UTC
This should be added as a 11.4 patch update when fixed, because without this clicking any yast2 icon does nothing. That would be very problematic for new users that don't know the command line yet. Changing the priority.
Comment 14 Forgotten User cAXlJ_FoSf 2011-04-19 08:51:22 UTC
*** Bug 682563 has been marked as a duplicate of this bug. ***
Comment 15 Forgotten User cAXlJ_FoSf 2011-04-19 09:23:17 UTC
(In reply to comment #13)
> This should be added as a 11.4 patch update when fixed, because without this
> clicking any yast2 icon does nothing. That would be very problematic for new
> users that don't know the command line yet. Changing the priority.

This bug does not affect YaST when called via gnomesu or kdesu (which is what happens when you start it though the KDE/GNOME/LXDE/Xfce menu). It is only a problem with the YaST GTK frontend (and other GTK applications) when starting it from a root shell which has not had the environment properly cleared, i.e. mostly the usage of "su" instead of "su -/-l".
Comment 16 Forgotten User cAXlJ_FoSf 2011-04-19 09:24:45 UTC
BTW, this bug has been fixed upstream, see https://bugzilla.gnome.org/show_bug.cgi?id=635694
Comment 17 Duncan Mac-Vicar 2011-04-26 07:32:54 UTC
*** Bug 675053 has been marked as a duplicate of this bug. ***
Comment 18 Dirk Mueller 2011-08-15 11:23:14 UTC
accepted as an update for 11.4
Comment 19 Swamp Workflow Management 2011-08-15 11:24:11 UTC
Update released for: glib2, glib2-branding-upstream, glib2-debugsource, glib2-devel, glib2-devel-debuginfo, glib2-devel-debuginfo-32bit, glib2-devel-debuginfo-x86, glib2-devel-static, glib2-lang, glib2-tools, glib2-tools-32bit, glib2-tools-debuginfo, glib2-tools-debuginfo-32bit, glib2-tools-debuginfo-x86, glib2-tools-x86, libgio-2_0-0, libgio-2_0-0-32bit, libgio-2_0-0-debuginfo, libgio-2_0-0-debuginfo-32bit, libgio-2_0-0-debuginfo-x86, libgio-2_0-0-x86, libgio-fam, libgio-fam-32bit, libgio-fam-debuginfo, libgio-fam-debuginfo-32bit, libgio-fam-debuginfo-x86, libgio-fam-x86, libglib-2_0-0, libglib-2_0-0-32bit, libglib-2_0-0-debuginfo, libglib-2_0-0-debuginfo-32bit, libglib-2_0-0-debuginfo-x86, libglib-2_0-0-x86, libgmodule-2_0-0, libgmodule-2_0-0-32bit, libgmodule-2_0-0-debuginfo, libgmodule-2_0-0-debuginfo-32bit, libgmodule-2_0-0-debuginfo-x86, libgmodule-2_0-0-x86, libgobject-2_0-0, libgobject-2_0-0-32bit, libgobject-2_0-0-debuginfo, libgobject-2_0-0-debuginfo-32bit, libgobject-2_0-0-debuginfo-x86, libgobject-2_0-0-x86, libgthread-2_0-0, libgthread-2_0-0-32bit, libgthread-2_0-0-debuginfo, libgthread-2_0-0-debuginfo-32bit, libgthread-2_0-0-debuginfo-x86, libgthread-2_0-0-x86
Products:
openSUSE 11.4 (debug, i586, x86_64)