diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2018-03-22 21:52:43 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-03-22 22:07:51 -0400 |
commit | aefad9593ec5ad4aae5346253a8b646364cd7317 (patch) | |
tree | 98f72912460afef0280f96f14880a8219c615f65 /security/security.c | |
parent | dd206bec9a446884805370b1c16c1d7a97036777 (diff) |
sem/security: Pass kern_ipc_perm not sem_array into the sem security hooks
All of the implementations of security hooks that take sem_array only
access sem_perm the struct kern_ipc_perm member. This means the
dependencies of the sem security hooks can be simplified by passing
the kern_ipc_perm member of sem_array.
Making this change will allow struct sem and struct sem_array
to become private to ipc/sem.c.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/security/security.c b/security/security.c index 1cd8526cb0b7..d3b9aeb6b73b 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -1220,27 +1220,27 @@ int security_shm_shmat(struct shmid_kernel *shp, char __user *shmaddr, int shmfl | |||
1220 | return call_int_hook(shm_shmat, 0, shp, shmaddr, shmflg); | 1220 | return call_int_hook(shm_shmat, 0, shp, shmaddr, shmflg); |
1221 | } | 1221 | } |
1222 | 1222 | ||
1223 | int security_sem_alloc(struct sem_array *sma) | 1223 | int security_sem_alloc(struct kern_ipc_perm *sma) |
1224 | { | 1224 | { |
1225 | return call_int_hook(sem_alloc_security, 0, sma); | 1225 | return call_int_hook(sem_alloc_security, 0, sma); |
1226 | } | 1226 | } |
1227 | 1227 | ||
1228 | void security_sem_free(struct sem_array *sma) | 1228 | void security_sem_free(struct kern_ipc_perm *sma) |
1229 | { | 1229 | { |
1230 | call_void_hook(sem_free_security, sma); | 1230 | call_void_hook(sem_free_security, sma); |
1231 | } | 1231 | } |
1232 | 1232 | ||
1233 | int security_sem_associate(struct sem_array *sma, int semflg) | 1233 | int security_sem_associate(struct kern_ipc_perm *sma, int semflg) |
1234 | { | 1234 | { |
1235 | return call_int_hook(sem_associate, 0, sma, semflg); | 1235 | return call_int_hook(sem_associate, 0, sma, semflg); |
1236 | } | 1236 | } |
1237 | 1237 | ||
1238 | int security_sem_semctl(struct sem_array *sma, int cmd) | 1238 | int security_sem_semctl(struct kern_ipc_perm *sma, int cmd) |
1239 | { | 1239 | { |
1240 | return call_int_hook(sem_semctl, 0, sma, cmd); | 1240 | return call_int_hook(sem_semctl, 0, sma, cmd); |
1241 | } | 1241 | } |
1242 | 1242 | ||
1243 | int security_sem_semop(struct sem_array *sma, struct sembuf *sops, | 1243 | int security_sem_semop(struct kern_ipc_perm *sma, struct sembuf *sops, |
1244 | unsigned nsops, int alter) | 1244 | unsigned nsops, int alter) |
1245 | { | 1245 | { |
1246 | return call_int_hook(sem_semop, 0, sma, sops, nsops, alter); | 1246 | return call_int_hook(sem_semop, 0, sma, sops, nsops, alter); |