diff options
author | Andi Kleen <ak@suse.de> | 2004-01-25 16:52:24 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-25 16:52:24 -0800 |
commit | e67eee8619c521eee00cd6c8e2b984b304d831a1 (patch) | |
tree | 686c03b2aac80801bad19dcc640f200a704216eb /ipc | |
parent | 76c403c4f23900a937fe72a3ef5ce25d7f561689 (diff) | |
download | history-e67eee8619c521eee00cd6c8e2b984b304d831a1.tar.gz |
[PATCH] Fix error checking in IPC_SET
The LSM changes broke the error checking for queue lengths in IPC_SET. The LSM check would
set set err to 0, but the next check expected it to still be -EPERM. Result was that
no error was reported, but the new parameters weren't correctly set.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/msg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ipc/msg.c b/ipc/msg.c index 76c1207b8c8981..709ff71bf5c1c0 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -557,6 +557,7 @@ asmlinkage long sys_msgctl (int msqid, int cmd, struct msqid_ds *buf) switch (cmd) { case IPC_SET: { + err = -EPERM; if (setbuf.qbytes > msg_ctlmnb && !capable(CAP_SYS_RESOURCE)) goto out_unlock_up; |