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 417758 - SEAHORSE_CHECK_MLOCK useless if user=root
SEAHORSE_CHECK_MLOCK useless if user=root
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
1.0
Other Mac OS
: Normal normal
: 1.0.0
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2007-03-13 05:57 UTC by Daniel Macks
Modified: 2007-03-17 20:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Macks 2007-03-13 05:57:44 UTC
SEAHORSE_CHECK_MLOCK in acinclude.m4 of seahorse-1.0 (and SVN HEAD looks the same) professes to check "whether mlock is callable as a normal user" by trying to use the mlock() function. But I don't see any check that this piece of code is being run as non-root. If one is root (setting aside the wisdom of compiling as root:) then the test is bogus: of course *root* can mlock (test always succeeds), but the ability to mlock as non-root remains untested (test result may not match reality).

The test needs to check first that it is not being run as root before doing the actual functional test. If it is root, I guess assuming normal users can mlock() isn't a bad guess, but need to be clear that it's assume-yes (or assume-no) not an actual tested result of yes or no.
Comment 1 Stef Walter 2007-03-17 20:26:33 UTC
Assuming 'no' in this case is probably more appropriate. My guess is that something built as root wants to be run as root :)

LMK if the fix looks acceptable to you.

2007-03-17  Nate Nielsen  <nielsen@memberwebs.com>

    * acinclude.m4: Fixed mlock checks. Fixes bug #417757 and 
    bug #417758
    
Commit: 1663