Bug#628383: libgnome-keyring: FTBFS on kfreebsd-*, test suite failure in test-secmem

Petr Salinger Petr.Salinger at seznam.cz
Fri Jun 7 07:21:01 UTC 2013


Hi.

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.

Cheers

 	Petr



More information about the pkg-gnome-maintainers mailing list