Do allow privilege to create over-sized messages on System V IPC

message queues in jail.
This commit is contained in:
Robert Watson 2007-02-19 13:23:45 +00:00
parent 86138fc742
commit ea04d82da8

View File

@ -508,7 +508,8 @@ kern_msgctl(td, msqid, cmd, msqbuf)
if ((error = ipcperm(td, &msqkptr->u.msg_perm, IPC_M)))
goto done2;
if (msqbuf->msg_qbytes > msqkptr->u.msg_qbytes) {
error = priv_check(td, PRIV_IPC_MSGSIZE);
error = priv_check_cred(td->td_ucred,
PRIV_IPC_MSGSIZE, SUSER_ALLOWJAIL);
if (error)
goto done2;
}