Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2020 01:30:14 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r357956 - head/sys/kern
Message-ID:  <202002150130.01F1UEYb045940@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Sat Feb 15 01:30:13 2020
New Revision: 357956
URL: https://svnweb.freebsd.org/changeset/base/357956

Log:
  kqueue: use new capsicum helpers

Modified:
  head/sys/kern/kern_event.c

Modified: head/sys/kern/kern_event.c
==============================================================================
--- head/sys/kern/kern_event.c	Sat Feb 15 01:29:58 2020	(r357955)
+++ head/sys/kern/kern_event.c	Sat Feb 15 01:30:13 2020	(r357956)
@@ -1195,11 +1195,11 @@ kern_kevent(struct thread *td, int fd, int nchanges, i
 	struct file *fp;
 	int error;
 
-	cap_rights_init(&rights);
+	cap_rights_init_zero(&rights);
 	if (nchanges > 0)
-		cap_rights_set(&rights, CAP_KQUEUE_CHANGE);
+		cap_rights_set_one(&rights, CAP_KQUEUE_CHANGE);
 	if (nevents > 0)
-		cap_rights_set(&rights, CAP_KQUEUE_EVENT);
+		cap_rights_set_one(&rights, CAP_KQUEUE_EVENT);
 	error = fget(td, fd, &rights, &fp);
 	if (error != 0)
 		return (error);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002150130.01F1UEYb045940>