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
@ -3128,5 +3128,5 @@ privcheck:
|
||||
}
|
||||
#endif
|
||||
|
||||
return (EACCES);
|
||||
return ((acc_mode & VADMIN) ? EPERM : EACCES);
|
||||
}
|
||||
|
@ -3128,5 +3128,5 @@ privcheck:
|
||||
}
|
||||
#endif
|
||||
|
||||
return (EACCES);
|
||||
return ((acc_mode & VADMIN) ? EPERM : EACCES);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user