summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_export.c2
-rw-r--r--sys/kern/vfs_subr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 285e084e7c12..fba809c63aaf 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);
}
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 285e084e7c12..fba809c63aaf 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -3128,5 +3128,5 @@ privcheck:
}
#endif
- return (EACCES);
+ return ((acc_mode & VADMIN) ? EPERM : EACCES);
}