After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353251 - Better handling of null paths
Better handling of null paths
Status: RESOLVED OBSOLETE
Product: gnome-keyring-manager
Classification: Deprecated
Component: general
CVS HEAD
Other All
: Normal minor
: ---
Assigned To: Keyring manager maintainers
Keyring manager maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-28 14:54 UTC by Julio Merino
Modified: 2008-11-15 19:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. (1.87 KB, patch)
2006-08-28 14:55 UTC, Julio Merino
none Details | Review

Description Julio Merino 2006-08-28 14:54:49 UTC
Please describe the problem:
gnome-keyring is unable to provide an application's executable path in all platforms different than Linux and FreeBSD.  Because of this, the gnome_keyring_item_ac_get_path_name returns a NULL pointer which was causing gnome-keyring-manager 2.14.0 to crash under NetBSD.  The crash happened in the gkm_acl_display_set_acl function.

This seems to be resolved somewhat in CVS head because the code now ensures that one of the parameters passed to a g_str_equal call is not NULL.  To be really safe it should check that both parameters are not NULL before the call; after all gnome-keyring could return one correctly but fail for the other.  This is what the attached patch does.

Furthermore the patch also makes the dialog show an "Unknown" string in the "Path:" field instead of leaving it empty.  I believe this is better than not showing anything because it gives a better idea of what is going on.

Steps to reproduce:
1. Install gnome-keyring-manager under NetBSD.
2. Depending on the version, see it crash or not show the application's path name at all.



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Julio Merino 2006-08-28 14:55:20 UTC
Created attachment 71779 [details] [review]
Proposed patch.
Comment 2 Mariano Suárez-Alvarez 2006-08-28 21:44:25 UTC
Instead of displaying simply «Unknown», a slightly better UI could be achieved by  simply storing NULLs in the model for unknown paths, and setting up a cell data function (using gtk_tree_view_column_set_cell_data_func) on the Path column for the TreeView, so that NULLs there get rendered with the string «Unknown» (or maybe «Not available»?) in the insensitive color.

The cell data func should check for NULL in the model's column, and when it sees  a NULL, set the foreground property of the cell renderer to the insensitive color (which you can get from the TreeView using gtk_widget_get_style, and looking at the text[INSENSITIVE] field of the resulting GtkStyle)
Comment 3 André Klapper 2008-11-15 18:14:10 UTC
gnome-keyring-manager has been deprecated and superseded by Seahorse more than one year ago.
There has not been any active code development for more than a year.

This bug will probably soon be closed as WONTFIX or OBSOLETE.
Comment 4 Germán Poo-Caamaño 2008-11-15 19:45:41 UTC
Thanks for taking the time to report this bug.
However, gnome-keyring-manager won't be developed anymore and it has
been superseded by Seahorse.