GNOME Bugzilla – Bug 417758
SEAHORSE_CHECK_MLOCK useless if user=root
Last modified: 2007-03-17 20:26:33 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.
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