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
f154a592bb
commit
dc1002d8c0
@ -3128,5 +3128,5 @@ vaccess(type, file_mode, file_uid, file_gid, acc_mode, cred, privused)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
|
||||||
return (EACCES);
|
return ((acc_mode & VADMIN) ? EPERM : EACCES);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user