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 484976 - Private Memory Lock error on systems that restrict use of mlock()
Private Memory Lock error on systems that restrict use of mlock()
Status: RESOLVED FIXED
Product: libgnome-keyring
Classification: Core
Component: General
2.20.x
Other All
: Normal trivial
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2007-10-09 09:00 UTC by Darren Kenny
Modified: 2019-02-22 11:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Darren Kenny 2007-10-09 09:00:12 UTC
Please describe the problem:
On Solaris it is not possible to use mlock() to lock memory into physical RAM due to it's impact on system resource, without additional privileges.

A regular user doesn't have this privilege by default, and this results in the message:

couldn't lock 16384 bytes of private memory: Not owner
** Message: couldn't allocate secure memory to keep passwords and or keys from being written to the disk

While this is true, this message should really be a debug message and not output all of the time when an application is run.

Steps to reproduce:
Run any application (e.g. pidgin) that uses gnome-keyring on Solaris, or a system that restricts the use of mlock. 

Actual results:
An error message is output.

Expected results:
Nothing, unless debug is enabled. The s/w is behaving as expected and as such should not complain.

Does this happen every time?
Yes

Other information:
Comment 1 Stef Walter 2007-10-09 15:45:38 UTC
Well it is not not really behaving as expected. Part of the expectation of gnome-keyring is to keep your passwords secure, and because of the OS it is not able to do that.

Is there another method on Solaris that we can obtain non-pageable memory, or perhaps another method for storing things securely in memory?

gnome-keyring needs very little memory for these purposes. Allowing say, 16K of non-pageable memory per user would suffice. 

Hiding the problem, in my opinion, isn't an optimal solution. 

This message is not seen by GUI users, but alerts administrators, developers and/or power users to the possible issue, until such a time as it is resolved on the OS or distribution in question. 
Comment 2 Stef Walter 2007-11-24 17:43:36 UTC
Ah, I see what you meant. Yes you're right. It seems dumb to print this message for applications, although for the daemon it makes sense.

Committed patch to the gnome-2-20 branch. If you have a chance, please build it and let me know if this fixes your problem.

Fix will be included in 2.20.3.
Comment 3 Stef Walter 2007-11-24 21:41:21 UTC
Whoops I meant 'included in 2.20.2'.