Hi Petr, Am 07.06.2013 09:21, schrieb Petr Salinger: > the test-secmem fails due to different restriction of FreeBSD kernel. > > The FreeBSD kernel does not allow mlock()/mlockall() for ordinary user. > > http://www.freebsd.org/cgi/man.cgi?query=mlock&sektion=2 > http://www.freebsd.org/cgi/man.cgi?query=mlockall&sektion=2 > > "These calls are only available to the super-user." > > This behaviour fully conforms to > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/mlock.html > http://pubs.opengroup.org/onlinepubs/9699919799/functions/mlockall.html > > "Appropriate privileges are required to lock process memory ..." > > Iff I do as a root in build directory: > cd egg/tests > chown root.root test-secmem > chmod u+s test-secmem > > I can later as ordinary user do > cd egg/tests > make check > > with output: > > TEST: test-secmem... (pid=13110) > /secmem/alloc_free: OK > /secmem/realloc_across: OK > /secmem/alloc_two: OK > /secmem/realloc: OK > /secmem/multialloc: OK > /secmem/clear: OK > /secmem/strclear: OK > PASS: test-secmem > > So the code seems to work correctly when appropriate privileges are > available.
What should be used on kfreebsd then to lock process memory as ordinary user, ie. how can this bug be fixed? Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature