summaryrefslogtreecommitdiffstats
path: root/sys/sys/file.h
diff options
context:
space:
mode:
authorjonathan <jonathan@FreeBSD.org>2011-07-05 13:45:10 +0000
committerjonathan <jonathan@FreeBSD.org>2011-07-05 13:45:10 +0000
commit6abbb93d5fb70390974d5b0bb73e75616bd9c39a (patch)
tree8fac81f33159cf57a8796a6cf8aa7178f0a65066 /sys/sys/file.h
parent3628e4b620c60e8668761c26fe1f11c9a2ad06ad (diff)
downloadFreeBSD-src-6abbb93d5fb70390974d5b0bb73e75616bd9c39a.zip
FreeBSD-src-6abbb93d5fb70390974d5b0bb73e75616bd9c39a.tar.gz
Rework _fget to accept capability parameters.
This new version of _fget() requires new parameters: - cap_rights_t needrights the rights that we expect the capability's rights mask to include (e.g. CAP_READ if we are going to read from the file) - cap_rights_t *haverights used to return the capability's rights mask (ignored if NULL) - u_char *maxprotp the maximum mmap() rights (e.g. VM_PROT_READ) that can be permitted (only used if we are going to mmap the file; ignored if NULL) - int fget_flags FGET_GETCAP if we want to return the capability itself, rather than the underlying object which it wraps Approved by: mentor (rwatson), re (Capsicum blanket) Sponsored by: Google Inc
Diffstat (limited to 'sys/sys/file.h')
-rw-r--r--sys/sys/file.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/file.h b/sys/sys/file.h
index cc4593b..eea2c00 100644
--- a/sys/sys/file.h
+++ b/sys/sys/file.h
@@ -179,6 +179,7 @@ extern volatile int openfiles; /* actual number of open files */
int fget(struct thread *td, int fd, struct file **fpp);
int fget_read(struct thread *td, int fd, struct file **fpp);
int fget_write(struct thread *td, int fd, struct file **fpp);
+int fgetcap(struct thread *td, int fd, struct file **fpp);
int _fdrop(struct file *fp, struct thread *td);
/*
OpenPOWER on IntegriCloud