summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/cap_rights_limit.2
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2013-03-02 21:11:30 +0000
committerpjd <pjd@FreeBSD.org>2013-03-02 21:11:30 +0000
commit702516e70b2669b5076691a0b760b4a37a8c06a2 (patch)
tree5dbc48bdb7b78718e22183ef377b76f2e3bc74c2 /lib/libc/sys/cap_rights_limit.2
parent5026b7b931be858ac65f951dc40069f970064606 (diff)
downloadFreeBSD-src-702516e70b2669b5076691a0b760b4a37a8c06a2.zip
FreeBSD-src-702516e70b2669b5076691a0b760b4a37a8c06a2.tar.gz
- Implement two new system calls:
int bindat(int fd, int s, const struct sockaddr *addr, socklen_t addrlen); int connectat(int fd, int s, const struct sockaddr *name, socklen_t namelen); which allow to bind and connect respectively to a UNIX domain socket with a path relative to the directory associated with the given file descriptor 'fd'. - Add manual pages for the new syscalls. - Make the new syscalls available for processes in capability mode sandbox. - Add capability rights CAP_BINDAT and CAP_CONNECTAT that has to be present on the directory descriptor for the syscalls to work. - Update audit(4) to support those two new syscalls and to handle path in sockaddr_un structure relative to the given directory descriptor. - Update procstat(1) to recognize the new capability rights. - Document the new capability rights in cap_rights_limit(2). Sponsored by: The FreeBSD Foundation Discussed with: rwatson, jilles, kib, des
Diffstat (limited to 'lib/libc/sys/cap_rights_limit.2')
-rw-r--r--lib/libc/sys/cap_rights_limit.210
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libc/sys/cap_rights_limit.2 b/lib/libc/sys/cap_rights_limit.2
index 0c527aa..d0605af 100644
--- a/lib/libc/sys/cap_rights_limit.2
+++ b/lib/libc/sys/cap_rights_limit.2
@@ -104,12 +104,20 @@ or
and that socket options set with
.Xr setsockopt 2
may also affect binding behavior.
+.It Dv CAP_BINDAT
+Permit
+.Xr bindat 2 .
+This right has to be present on the directory descriptor.
.It Dv CAP_CONNECT
Permit
.Xr connect 2 ;
also required for
.Xr sendto 2
with a non-NULL destination address.
+.It Dv CAP_CONNECTAT
+Permit
+.Xr connectat 2 .
+This right has to be present on the directory descriptor.
.It Dv CAP_CREATE
Permit
.Xr openat 2
@@ -511,11 +519,13 @@ argument points at an invalid address.
.Xr aio_read 2 ,
.Xr aio_write 2 ,
.Xr bind 2 ,
+.Xr bindat 2 ,
.Xr cap_enter 2 ,
.Xr cap_fcntls_limit 2 ,
.Xr cap_ioctls_limit 2 ,
.Xr cap_rights_limit 2 ,
.Xr connect 2 ,
+.Xr connectat 2 ,
.Xr dup 2 ,
.Xr dup2 2 ,
.Xr extattr_delete_fd 2 ,
OpenPOWER on IntegriCloud