Comment 53 for bug 218434

Revision history for this message
Jonathan Heard (jon-launchpad-jeh) wrote :

Hi Karl,
     If you still have the stuff below installed, please can you rerun your configure command and post back whether your build enables or disables HAL support (you could just attach the configure output):

- install gnome-devel
- download gnome-keyring from svn
- configure with prefix = /usr
- install

I believe PAM has nothing to do with this problem, except it is the gnome-keyring PAM module which executes 'gnome-keyring-daemon -d --login' . It is 'gnome-keyring-daemon' itself which crashes and unfortunately the -d option means it deamonizes and returns exit 0, before the crash occurrs causing PAM (or anything else which cares like gdb) to think it exited normally. Then the sneaky little bugger goes and dies and the only thing which seems to notice it is the kernel.

The actual problem lies within the gnome-keyring-daemon code while it tries to manage removeable storage and you'll only hit this part of the code if gnome-keyring-daemon was built with HAL Support for Removable Devices enabled.

The reason that the work-around using 'auto-login' works is that GDM uses a different pam config for automatic login (/etc/pam.d/gdm-autologin) which for some reason does not include the gnome-keyring module. Hence it's the same as deleting the gnome-keyring references from /etc/pam.d/gdm

Having discussed this bug with a few knowledgable colleagues the concensus is that regardless of why g_hash_table_lookup() returns null or whether it ever should, we should always check the return code:

at hal_device_property() in gkr-location.c
 323 locvol = g_hash_table_lookup (pv->volumes_by_name, name);
 324 locvol->hal_volume = TRUE;

Between 323 and 324 we need a check that 'locvol' is not null before using it as an address.
If g_hash_table_lookup should never return 'null' then perhaps an 'assert(locvol != null)' should be added, but if 'null' is a valid retun then we need extra code to check it and handle it within this function, the simplest being 'if (locvol != null ) { locvol->hal_volume=TRUE; }'