summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-09-25 21:11:40 +0000
committerpjd <pjd@FreeBSD.org>2012-09-25 21:11:40 +0000
commit8e4b011dc562ea92fc1144b9fd2a52c1e78c5fd6 (patch)
treed513949dfce8c23f6b5373461b38eebde52e7fa7 /sys/kern/kern_exec.c
parent1d5d62ac360507bc9a69359ccb030896d1daca84 (diff)
downloadFreeBSD-src-8e4b011dc562ea92fc1144b9fd2a52c1e78c5fd6.zip
FreeBSD-src-8e4b011dc562ea92fc1144b9fd2a52c1e78c5fd6.tar.gz
We cannot open file for reading and executing (O_RDONLY | O_EXEC).
Well, in theory we can pass those two flags, because O_RDONLY is 0, but we won't be able to read from a descriptor opened with O_EXEC. Update the comment. Sponsored by: FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 90f7311b..20a9b81 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -441,10 +441,10 @@ interpret:
} else {
AUDIT_ARG_FD(args->fd);
/*
- * Some might argue that CAP_READ and/or CAP_MMAP should also
- * be required here; such arguments will be entertained.
+ * Some might argue that CAP_MMAP should also be required here;
+ * such arguments will be entertained.
*
- * Descriptors opened only with O_EXEC or O_RDONLY are allowed.
+ * Descriptors opened only with O_EXEC are allowed.
*/
error = fgetvp_exec(td, args->fd, CAP_FEXECVE, &binvp);
if (error)
OpenPOWER on IntegriCloud