GNOME Bugzilla – Bug 435015
Use gnome-keyring secure memory API
Last modified: 2007-11-11 16:37:19 UTC
Hi, the current mlock() check fails if called as root (or with fakeroot or similar tools). This breaks on all kinds of package autobuilders like used for Debian and Ubuntu. Instead of checking for uid==0 it would be better to just check the kernel version number, kernels greater than 2.6.8 support mlock() as normal user. Bye
I'm not sure we can do that. What about OS's other than Linux?
No idea... but this check should probably be moved to runtime in any way. The build environment and runtime environment could be complete different in many aspects that effect mlock().
The only reason that the check is done, is so that we can avoid installing the programs setuid root. But I agree this is ancient and unneeded legacy stuff. Attached is a patch which makes seahorse use the secure memory API exposed by gnome-keyring. This is far more modern and resilient, and doesn't entertain silly ideas of setuidness.
Created attachment 94033 [details] [review] Use gnome-keyring for secure memory.
Looking at the patch, this makes gnome-keyring a hard dependency like gpg and gpgme correct?
Yes, that would be the case. Given that gnome-keyring will be providing an X509 certificate store, it'll make sense to have a hard dependency to it. At least it seems that way now. But we can revisit this at the next release cycle, if needed.
Stef, Could you please regenerate this patch as it no longer applies cleanly?
Committed. I found the time to straighten out the rejected hunks. 2007-11-11 Adam Schreiber <sadam@clemson.edu> * src/seahorse-key-dialogs.h: * src/seahorse-key-manager.c: * src/seahorse-gkeyring-operation.c: * src/main.c: * src/Makefile.am: * INSTALL: * plugins/nautilus/seahorse-tool.c: * plugins/applet/seahorse-applet.c: * configure.in: * agent/seahorse-agent-actions.c: * agent/seahorse-agent-cache.c: * agent/seahorse-agent-status.c: * agent/seahorse-agent-main.c: * libseahorse/seahorse-secure-memory.c: * libseahorse/seahorse-secure-memory.h: * libseahorse/seahorse-ssh-operation.c: * libseahorse/seahorse-prefs-cache.c: * daemon/seahorse-daemon.c: Use secure memory from gnome-keyring. Patch from Stef Walter. Fixes bug #435015