mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 17:54:52 +00:00
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
This commit is contained in:
parent
64d9f3b982
commit
02b65ffb64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71411
|
@ -3128,5 +3128,5 @@ vaccess(type, file_mode, file_uid, file_gid, acc_mode, cred, privused)
|
|||
}
|
||||
#endif
|
||||
|
||||
return (EACCES);
|
||||
return ((acc_mode & VADMIN) ? EPERM : EACCES);
|
||||
}
|
||||
|
|
|
@ -3128,5 +3128,5 @@ vaccess(type, file_mode, file_uid, file_gid, acc_mode, cred, privused)
|
|||
}
|
||||
#endif
|
||||
|
||||
return (EACCES);
|
||||
return ((acc_mode & VADMIN) ? EPERM : EACCES);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue