Author: glebius Date: Mon Oct 24 14:35:31 2011 New Revision: 226690 URL: http://svn.freebsd.org/changeset/base/226690
Log: Protect NIS client with madvise(2) since this daemon is required for succesful authentication of users. Modified: head/usr.sbin/ypbind/ypbind.c Modified: head/usr.sbin/ypbind/ypbind.c ============================================================================== --- head/usr.sbin/ypbind/ypbind.c Mon Oct 24 14:23:40 2011 (r226689) +++ head/usr.sbin/ypbind/ypbind.c Mon Oct 24 14:35:31 2011 (r226690) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include <sys/types.h> #include <sys/wait.h> #include <sys/ioctl.h> +#include <sys/mman.h> #include <sys/signal.h> #include <sys/socket.h> #include <sys/file.h> @@ -465,6 +466,9 @@ main(int argc, char *argv[]) openlog(argv[0], LOG_PID, LOG_DAEMON); + if (madvise(NULL, 0, MADV_PROTECT) != 0) + syslog(LOG_WARNING, "madvise(): %m"); + /* Kick off the default domain */ broadcast(ypbindlist); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"