aboutsummaryrefslogtreecommitdiffstats
path: root/security/security.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-03-22 22:08:27 -0400
committerEric W. Biederman <ebiederm@xmission.com>2018-03-22 22:08:27 -0400
commit7191adff2a5566efb139c79ea03eda3d0520d44a (patch)
treebfde0d973881cfaa21e9993b290de4ca9c5bbe4b /security/security.c
parentaefad9593ec5ad4aae5346253a8b646364cd7317 (diff)
shm/security: Pass kern_ipc_perm not shmid_kernel into the shm security hooks
All of the implementations of security hooks that take shmid_kernel only access shm_perm the struct kern_ipc_perm member. This means the dependencies of the shm security hooks can be simplified by passing the kern_ipc_perm member of shmid_kernel.. Making this change will allow struct shmid_kernel to become private to ipc/shm.c. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/security/security.c b/security/security.c
index d3b9aeb6b73b..77b69bd6f234 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1195,27 +1195,27 @@ int security_msg_queue_msgrcv(struct msg_queue *msq, struct msg_msg *msg,
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);
1196} 1196}
1197 1197
1198int security_shm_alloc(struct shmid_kernel *shp) 1198int security_shm_alloc(struct kern_ipc_perm *shp)
1199{ 1199{
1200 return call_int_hook(shm_alloc_security, 0, shp); 1200 return call_int_hook(shm_alloc_security, 0, shp);
1201} 1201}
1202 1202
1203void security_shm_free(struct shmid_kernel *shp) 1203void security_shm_free(struct kern_ipc_perm *shp)
1204{ 1204{
1205 call_void_hook(shm_free_security, shp); 1205 call_void_hook(shm_free_security, shp);
1206} 1206}
1207 1207
1208int security_shm_associate(struct shmid_kernel *shp, int shmflg) 1208int security_shm_associate(struct kern_ipc_perm *shp, int shmflg)
1209{ 1209{
1210 return call_int_hook(shm_associate, 0, shp, shmflg); 1210 return call_int_hook(shm_associate, 0, shp, shmflg);
1211} 1211}
1212 1212
1213int security_shm_shmctl(struct shmid_kernel *shp, int cmd) 1213int security_shm_shmctl(struct kern_ipc_perm *shp, int cmd)
1214{ 1214{
1215 return call_int_hook(shm_shmctl, 0, shp, cmd); 1215 return call_int_hook(shm_shmctl, 0, shp, cmd);
1216} 1216}
1217 1217
1218int security_shm_shmat(struct shmid_kernel *shp, char __user *shmaddr, int shmflg) 1218int security_shm_shmat(struct kern_ipc_perm *shp, char __user *shmaddr, int shmflg)
1219{ 1219{
1220 return call_int_hook(shm_shmat, 0, shp, shmaddr, shmflg); 1220 return call_int_hook(shm_shmat, 0, shp, shmaddr, shmflg);
1221} 1221}