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:
rwatson 2001-01-23 04:15:19 +00:00
parent f154a592bb
commit dc1002d8c0
2 changed files with 2 additions and 2 deletions

View File

@ -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);
} }

View File

@ -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);
} }