summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2000-07-13 20:31:24 +0000
committerrwatson <rwatson@FreeBSD.org>2000-07-13 20:31:24 +0000
commitd8fbcbd787338261d16d69869a895993583c0c65 (patch)
treeaf5d70ccbf6a31d3d03b224f3e7249c860cb1820
parentfa3f7856a53f374e0e5a539441f4a2bd2b8810cf (diff)
downloadFreeBSD-src-d8fbcbd787338261d16d69869a895993583c0c65.zip
FreeBSD-src-d8fbcbd787338261d16d69869a895993583c0c65.tar.gz
o Introduce syscall prototypes, stubs for __cap_{get,set}_{fd,file},
syscalls to manage capability sets on files. First of two commits. Obtained from: TrustedBSD Project
-rw-r--r--sys/kern/kern_cap.c32
-rw-r--r--sys/kern/syscalls.master4
2 files changed, 36 insertions, 0 deletions
diff --git a/sys/kern/kern_cap.c b/sys/kern/kern_cap.c
index 6c5dc58..c0e1824 100644
--- a/sys/kern/kern_cap.c
+++ b/sys/kern/kern_cap.c
@@ -64,3 +64,35 @@ __cap_set_proc(struct proc *p, struct __cap_set_proc_args *uap)
return (ENOSYS);
}
+
+/*
+ * Syscalls to allow a process to retrieve capabilities associated with
+ * files, if permitted.
+ */
+__cap_get_fd(struct proc *p, struct __cap_get_fd_args *uap)
+{
+
+ return (ENOSYS);
+}
+
+__cap_get_file(struct proc *p, struct __cap_get_file_args *uap)
+{
+
+ return (ENOSYS);
+}
+
+/*
+ * Syscalls to allow a process to set capabilities associated with files,
+ * if permitted.
+ */
+__cap_set_fd(struct proc *p, struct __cap_set_fd_args *uap)
+{
+
+ return (ENOSYS);
+}
+
+__cap_set_file(struct proc *p, struct __cap_set_file_args *uap)
+{
+
+ return (ENOSYS);
+}
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index eb4fd58..bc9cfb6 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -522,3 +522,7 @@
struct timespec *timeout); }
364 STD BSD { int __cap_get_proc(struct cap *cap_p); }
365 STD BSD { int __cap_set_proc(struct cap *cap_p); }
+366 STD BSD { int __cap_get_fd(int fd, struct cap *cap_p); }
+367 STD BSD { int __cap_get_file(const char *path_p, struct cap *cap_p); }
+368 STD BSD { int __cap_set_fd(int fd, struct cap *cap_p); }
+369 STD BSD { int __cap_set_file(const char *path_p, struct cap *cap_p); }
OpenPOWER on IntegriCloud