Author: mjg
Date: Mon Sep  7 20:05:56 2015
New Revision: 287540
URL: https://svnweb.freebsd.org/changeset/base/287540

Log:
  fd: make rights a mandatory argument to fgetvp_rights
  
  The only caller already always passes rights.

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c        Mon Sep  7 20:02:56 2015        
(r287539)
+++ head/sys/kern/kern_descrip.c        Mon Sep  7 20:05:56 2015        
(r287540)
@@ -2721,11 +2721,9 @@ fgetvp_rights(struct thread *td, int fd,
                return (EBADF);
 
 #ifdef CAPABILITIES
-       if (needrightsp != NULL) {
-               error = cap_check(cap_rights(fdp, fd), needrightsp);
-               if (error != 0)
-                       return (error);
-       }
+       error = cap_check(cap_rights(fdp, fd), needrightsp);
+       if (error != 0)
+               return (error);
 #endif
 
        if (fp->f_vnode == NULL)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to