Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107156471
D12640.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12640.diff
View Options
Index: head/lib/libc/sys/posix_fallocate.2
===================================================================
--- head/lib/libc/sys/posix_fallocate.2
+++ head/lib/libc/sys/posix_fallocate.2
@@ -28,7 +28,7 @@
.\" @(#)open.2 8.2 (Berkeley) 11/16/93
.\" $FreeBSD$
.\"
-.Dd January 23, 2014
+.Dd October 12, 2017
.Dt POSIX_FALLOCATE 2
.Os
.Sh NAME
@@ -118,6 +118,10 @@
.It Bq Er ENOSPC
There is insufficient free space remaining on the file system storage
media.
+.It Bq Er ENOTCAPABLE
+The file descriptor
+.Fa fd
+has insufficient rights.
.It Bq Er ESPIPE
The
.Fa fd
Index: head/sys/kern/capabilities.conf
===================================================================
--- head/sys/kern/capabilities.conf
+++ head/sys/kern/capabilities.conf
@@ -488,6 +488,7 @@
##
## Allow I/O-related file descriptors, subject to capability rights.
##
+posix_fallocate
pread
preadv
Index: head/sys/kern/vfs_syscalls.c
===================================================================
--- head/sys/kern/vfs_syscalls.c
+++ head/sys/kern/vfs_syscalls.c
@@ -4400,7 +4400,7 @@
if (offset > OFF_MAX - len)
return (EFBIG);
AUDIT_ARG_FD(fd);
- error = fget(td, fd, cap_rights_init(&rights, CAP_WRITE), &fp);
+ error = fget(td, fd, cap_rights_init(&rights, CAP_PWRITE), &fp);
if (error != 0)
return (error);
AUDIT_ARG_FILE(td->td_proc, fp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 11:55 PM (16 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15759030
Default Alt Text
D12640.diff (1 KB)
Attached To
Mode
D12640: libc: allow posix_fallocate in capability mode
Attached
Detach File
Event Timeline
Log In to Comment