Attempt to marginally de-obfuscate sections of the System V IPC access

control logic.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
This commit is contained in:
Robert Watson 2003-05-31 23:17:30 +00:00
parent 395aac85f8
commit a0ccd3f6ad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115579

View File

@ -91,6 +91,11 @@ ipcperm(td, perm, mode)
if (mode & IPC_M)
return (0);
return ((mode & perm->mode) == mode ||
suser(td) == 0 ? 0 : EACCES);
if ((mode & perm->mode) != mode) {
if (suser(td) != 0)
return (EACCES);
}
return (0);
}