! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Xfce4-mount-plugin crashes when fstab is not readable
Status:
RESOLVED: FIXED
Product:
Xfce4-mount-plugin
Component:
General

Comments

Description michael.uherek 2008-12-29 19:12:02 CET
If I try to add the xfce4-mount-plugin into the xfce4-panel nothing happens.
Just ~/.xsession-errors gives a hint:

** Message: Geräte einhängen: screen changed: 0

** Message: No valid plug window.

(xfce4-panel:10324): Gtk-CRITICAL **: gtk_socket_get_id: assertion `GTK_WIDGET_ANCHORED (socket)' failed

** (xfce4-panel:10324): CRITICAL **: Ein Element wurde unerwartet entfernt: »Geräte einhängen«.
Comment 1 Nick Schermer editbugs 2008-12-30 11:31:09 CET
This looks like the mount plugin crashes during startup (ie. when you add it to the panel). Reassign to the mount panel plugin (created new component).
Comment 2 michael.uherek 2008-12-31 11:18:15 CET
Created attachment 2059 
valgrind.output
Comment 3 Nick Schermer editbugs 2008-12-31 11:40:56 CET
Valgrind log is useless since it shows memory leaks. Create a backtrace in gdb instead.
Comment 4 michael.uherek 2008-12-31 13:42:00 CET
I created a debug-build package auf xfce4-mount-plugin but have no idea how to debug the plugin. The described way to debug external plugins at http://spuriousinterrupt.org/projects/xfce4-debug will only work if I can successfully add the plugin to the panel without it crashing. 
Any sugestions to go on?
Comment 5 Nick Schermer editbugs 2008-12-31 13:58:26 CET
Yeah that's a bit difficult... Will try it myself this week, see if I can find a cause.
Comment 6 Mike Massonnet editbugs 2008-12-31 14:39:59 CET
http://wiki.xfce.org/howto/panel_plugin_debug

It should be trivial to make a call to gdb the same way.

Something like this might suffice (in one line):
gdb -ex r -ex bt -ex q /path/to/panel-plugins/foo-plugin.real > 
/path/to/gdb.output 2>&1
Comment 7 michael.uherek 2008-12-31 15:22:24 CET
Seems that i figured out the problem!
My /etc/fstab had no world-readable permissions.
After changing 
-rw-r----- 1 root root 716 30. Dez 12:52 /etc/fstab
to 
-rw-r--r-- 1 root root 716 31. Dez 15:44 /etc/fstab
the mount-plugin works fine.

Normaly there is no need for normal users to read fstab, because mount/umount got a suid-bit or corresponding PCAPS to override file permissions. But the mount-plugin seems to read as user process fstab direcly and will fail without world-read permissions.
Comment 8 Nick Schermer editbugs 2008-12-31 16:21:54 CET
Ok, thanks for figuring that out. I've changed the bug subject to be more descriptive.
Comment 9 Fabian Nowak editbugs 2009-01-01 13:46:21 CET
(In reply to comment #8)
> Ok, thanks for figuring that out. I've changed the bug subject to be more
> descriptive.

Hmm, thanks for investigating. Though, I'd say that even in times of udev and haldaemon your  fstab should be user-readable because it is *the* place to put fixed locations into such as floppy and cdrom.

Anyway, I will include a popup dialog or notification for that case during the next 3 weeks.
Comment 10 Fabian Nowak editbugs 2009-01-18 18:17:02 CET
(In reply to comment #9)
> (In reply to comment #8)
> > Ok, thanks for figuring that out. I've changed the bug subject to be more
> > descriptive.
> 
> Hmm, thanks for investigating. Though, I'd say that even in times of udev and
> haldaemon your  fstab should be user-readable because it is *the* place to put
> fixed locations into such as floppy and cdrom.
> 
> Anyway, I will include a popup dialog or notification for that case during the
> next 3 weeks.

OK, fixed in current svn trunk; though the plugin will still severely crash when mtab isn't readable. I am not gonna care for that latter case, 'cause such a system would be badly administered and broken anyway.

Bug #4755

Reported by:
michael.uherek
Reported on: 2008-12-29
Last modified on: 2009-07-15

People

Assignee:
Fabian Nowak
CC List:
1 user

Version

Version:
unspecified

Attachments

valgrind.output (105.05 KB, application/octet-stream)
2008-12-31 11:18 CET , michael.uherek
no flags

Additional information