svn commit: r256376 - user/dchagin/lemul/sys/amd64/linux

Dmitry Chagin dchagin at FreeBSD.org
Sat Oct 12 12:34:20 UTC 2013


Author: dchagin
Date: Sat Oct 12 12:34:19 2013
New Revision: 256376
URL: http://svnweb.freebsd.org/changeset/base/256376

Log:
  According to r255219 change the cap_rights_t type in the fget() call.

Modified:
  user/dchagin/lemul/sys/amd64/linux/linux_machdep.c

Modified: user/dchagin/lemul/sys/amd64/linux/linux_machdep.c
==============================================================================
--- user/dchagin/lemul/sys/amd64/linux/linux_machdep.c	Sat Oct 12 12:23:06 2013	(r256375)
+++ user/dchagin/lemul/sys/amd64/linux/linux_machdep.c	Sat Oct 12 12:34:19 2013	(r256376)
@@ -163,6 +163,7 @@ linux_mmap2(struct thread *td, struct li
 	} */ bsd_args;
 	int error;
 	struct file *fp;
+	cap_rights_t rights;
 
 	LINUX_CTR6(mmap2, "0x%lx, %ld, %ld, 0x%08lx, %ld, 0x%lx",
 	    args->addr, args->len, args->prot,
@@ -212,7 +213,9 @@ linux_mmap2(struct thread *td, struct li
 		 * protection options specified.
 		 */
 
-		if ((error = fget(td, bsd_args.fd, CAP_MMAP, &fp)) != 0)
+		error = fget(td, bsd_args.fd,
+		    cap_rights_init(&rights, CAP_MMAP), &fp);
+		if (error != 0 )
 			return (error);
 		if (fp->f_type != DTYPE_VNODE) {
 			fdrop(fp, td);


More information about the svn-src-user mailing list