mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ipc: Directly call the security hook in ipc_ops.associate
After the last round of cleanups the shm, sem, and msg associate operations just became trivial wrappers around the appropriate security method. Simplify things further by just calling the security method directly. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
parent
51d6f2635b
commit
50ab44b1c5
3 changed files with 3 additions and 27 deletions
10
ipc/msg.c
10
ipc/msg.c
|
@ -272,20 +272,12 @@ static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
|
|||
ipc_rcu_putref(&msq->q_perm, msg_rcu_free);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called with msg_ids.rwsem and ipcp locked.
|
||||
*/
|
||||
static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg)
|
||||
{
|
||||
return security_msg_queue_associate(ipcp, msgflg);
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg)
|
||||
{
|
||||
struct ipc_namespace *ns;
|
||||
static const struct ipc_ops msg_ops = {
|
||||
.getnew = newque,
|
||||
.associate = msg_security,
|
||||
.associate = security_msg_queue_associate,
|
||||
};
|
||||
struct ipc_params msg_params;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue