diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2018-03-22 22:22:26 -0400 |
|---|---|---|
| committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-03-22 22:22:26 -0400 |
| commit | d8c6e8543294428426578d74dc7aaf121e762d58 (patch) | |
| tree | 5a7fb08578f66f55f030e7fd1de237e5f756a847 /security/security.c | |
| parent | 7191adff2a5566efb139c79ea03eda3d0520d44a (diff) | |
msg/security: Pass kern_ipc_perm not msg_queue into the msg_queue security hooks
All of the implementations of security hooks that take msg_queue only
access q_perm the struct kern_ipc_perm member. This means the
dependencies of the msg_queue security hooks can be simplified by
passing the kern_ipc_perm member of msg_queue.
Making this change will allow struct msg_queue to become private to
ipc/msg.c.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'security/security.c')
| -rw-r--r-- | security/security.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/security/security.c b/security/security.c index 77b69bd6f234..02d734e69955 100644 --- a/security/security.c +++ b/security/security.c | |||
| @@ -1163,33 +1163,33 @@ void security_msg_msg_free(struct msg_msg *msg) | |||
| 1163 | call_void_hook(msg_msg_free_security, msg); | 1163 | call_void_hook(msg_msg_free_security, msg); |
| 1164 | } | 1164 | } |
| 1165 | 1165 | ||
| 1166 | int security_msg_queue_alloc(struct msg_queue *msq) | 1166 | int security_msg_queue_alloc(struct kern_ipc_perm *msq) |
| 1167 | { | 1167 | { |
| 1168 | return call_int_hook(msg_queue_alloc_security, 0, msq); | 1168 | return call_int_hook(msg_queue_alloc_security, 0, msq); |
| 1169 | } | 1169 | } |
| 1170 | 1170 | ||
| 1171 | void security_msg_queue_free(struct msg_queue *msq) | 1171 | void security_msg_queue_free(struct kern_ipc_perm *msq) |
| 1172 | { | 1172 | { |
| 1173 | call_void_hook(msg_queue_free_security, msq); | 1173 | call_void_hook(msg_queue_free_security, msq); |
| 1174 | } | 1174 | } |
| 1175 | 1175 | ||
| 1176 | int security_msg_queue_associate(struct msg_queue *msq, int msqflg) | 1176 | int security_msg_queue_associate(struct kern_ipc_perm *msq, int msqflg) |
| 1177 | { | 1177 | { |
| 1178 | return call_int_hook(msg_queue_associate, 0, msq, msqflg); | 1178 | return call_int_hook(msg_queue_associate, 0, msq, msqflg); |
| 1179 | } | 1179 | } |
| 1180 | 1180 | ||
| 1181 | int security_msg_queue_msgctl(struct msg_queue *msq, int cmd) | 1181 | int security_msg_queue_msgctl(struct kern_ipc_perm *msq, int cmd) |
| 1182 | { | 1182 | { |
| 1183 | return call_int_hook(msg_queue_msgctl, 0, msq, cmd); | 1183 | return call_int_hook(msg_queue_msgctl, 0, msq, cmd); |
| 1184 | } | 1184 | } |
| 1185 | 1185 | ||
| 1186 | int security_msg_queue_msgsnd(struct msg_queue *msq, | 1186 | int security_msg_queue_msgsnd(struct kern_ipc_perm *msq, |
| 1187 | struct msg_msg *msg, int msqflg) | 1187 | struct msg_msg *msg, int msqflg) |
| 1188 | { | 1188 | { |
| 1189 | return call_int_hook(msg_queue_msgsnd, 0, msq, msg, msqflg); | 1189 | return call_int_hook(msg_queue_msgsnd, 0, msq, msg, msqflg); |
| 1190 | } | 1190 | } |
| 1191 | 1191 | ||
| 1192 | int security_msg_queue_msgrcv(struct msg_queue *msq, struct msg_msg *msg, | 1192 | int security_msg_queue_msgrcv(struct kern_ipc_perm *msq, struct msg_msg *msg, |
| 1193 | struct task_struct *target, long type, int mode) | 1193 | struct task_struct *target, long type, int mode) |
| 1194 | { | 1194 | { |
| 1195 | return call_int_hook(msg_queue_msgrcv, 0, msq, msg, target, type, mode); | 1195 | return call_int_hook(msg_queue_msgrcv, 0, msq, msg, target, type, mode); |
