summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_export.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-01-23 04:15:19 +0000
committerrwatson <rwatson@FreeBSD.org>2001-01-23 04:15:19 +0000
commita7fc696a51f8152e18bc2ed4cb11aea0a55e9434 (patch)
tree8ec3862b1f8f7f855c49737a9aef36347fa255d4 /sys/kern/vfs_export.c
parent09f032c118556ae5932b3755ab624ef9bdeb6270 (diff)
downloadFreeBSD-src-a7fc696a51f8152e18bc2ed4cb11aea0a55e9434.zip
FreeBSD-src-a7fc696a51f8152e18bc2ed4cb11aea0a55e9434.tar.gz
o The move to using VADMIN under vaccess() resulted in some system
calls returning EACCES instead of EPERM. This patch modifies vaccess() to return EPERM instead of EACCES if VADMIN is among the requested rights. This affects functions normally limited to the owners of a file, such as chmod(), as EPERM is the error indicating that privilege would allow the operation, rather than a chance in mandatory or discretionary rights. Reported by: bde
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r--sys/kern/vfs_export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 285e084..fba809c 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -3128,5 +3128,5 @@ privcheck:
}
#endif
- return (EACCES);
+ return ((acc_mode & VADMIN) ? EPERM : EACCES);
}
OpenPOWER on IntegriCloud