Protect NIS server with madvise(2) since this daemon is required

for succesful authentication of users.
This commit is contained in:
Gleb Smirnoff 2011-10-25 10:33:26 +00:00
parent 571e19b341
commit b8e20190a3

View File

@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
*/
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/wait.h>
@ -525,6 +526,9 @@ main(int argc, char *argv[])
unregister();
}
if (madvise(NULL, 0, MADV_PROTECT) != 0)
_msgout("madvise(): %s", strerror(errno));
/*
* Create RPC service for each transport.
*/