diff options
Diffstat (limited to 'security/smack/smack_lsm.c')
-rw-r--r-- | security/smack/smack_lsm.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 0241fd359675..732ba27923c4 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -1117,11 +1117,6 @@ static int smack_task_movememory(struct task_struct *p) | |||
1117 | static int smack_task_kill(struct task_struct *p, struct siginfo *info, | 1117 | static int smack_task_kill(struct task_struct *p, struct siginfo *info, |
1118 | int sig, u32 secid) | 1118 | int sig, u32 secid) |
1119 | { | 1119 | { |
1120 | int rc; | ||
1121 | |||
1122 | rc = cap_task_kill(p, info, sig, secid); | ||
1123 | if (rc != 0) | ||
1124 | return rc; | ||
1125 | /* | 1120 | /* |
1126 | * Special cases where signals really ought to go through | 1121 | * Special cases where signals really ought to go through |
1127 | * in spite of policy. Stephen Smalley suggests it may | 1122 | * in spite of policy. Stephen Smalley suggests it may |
@@ -1508,7 +1503,7 @@ static int smack_shm_associate(struct shmid_kernel *shp, int shmflg) | |||
1508 | */ | 1503 | */ |
1509 | static int smack_shm_shmctl(struct shmid_kernel *shp, int cmd) | 1504 | static int smack_shm_shmctl(struct shmid_kernel *shp, int cmd) |
1510 | { | 1505 | { |
1511 | char *ssp = smack_of_shm(shp); | 1506 | char *ssp; |
1512 | int may; | 1507 | int may; |
1513 | 1508 | ||
1514 | switch (cmd) { | 1509 | switch (cmd) { |
@@ -1532,6 +1527,7 @@ static int smack_shm_shmctl(struct shmid_kernel *shp, int cmd) | |||
1532 | return -EINVAL; | 1527 | return -EINVAL; |
1533 | } | 1528 | } |
1534 | 1529 | ||
1530 | ssp = smack_of_shm(shp); | ||
1535 | return smk_curacc(ssp, may); | 1531 | return smk_curacc(ssp, may); |
1536 | } | 1532 | } |
1537 | 1533 | ||
@@ -1616,7 +1612,7 @@ static int smack_sem_associate(struct sem_array *sma, int semflg) | |||
1616 | */ | 1612 | */ |
1617 | static int smack_sem_semctl(struct sem_array *sma, int cmd) | 1613 | static int smack_sem_semctl(struct sem_array *sma, int cmd) |
1618 | { | 1614 | { |
1619 | char *ssp = smack_of_sem(sma); | 1615 | char *ssp; |
1620 | int may; | 1616 | int may; |
1621 | 1617 | ||
1622 | switch (cmd) { | 1618 | switch (cmd) { |
@@ -1645,6 +1641,7 @@ static int smack_sem_semctl(struct sem_array *sma, int cmd) | |||
1645 | return -EINVAL; | 1641 | return -EINVAL; |
1646 | } | 1642 | } |
1647 | 1643 | ||
1644 | ssp = smack_of_sem(sma); | ||
1648 | return smk_curacc(ssp, may); | 1645 | return smk_curacc(ssp, may); |
1649 | } | 1646 | } |
1650 | 1647 | ||
@@ -1730,7 +1727,7 @@ static int smack_msg_queue_associate(struct msg_queue *msq, int msqflg) | |||
1730 | */ | 1727 | */ |
1731 | static int smack_msg_queue_msgctl(struct msg_queue *msq, int cmd) | 1728 | static int smack_msg_queue_msgctl(struct msg_queue *msq, int cmd) |
1732 | { | 1729 | { |
1733 | char *msp = smack_of_msq(msq); | 1730 | char *msp; |
1734 | int may; | 1731 | int may; |
1735 | 1732 | ||
1736 | switch (cmd) { | 1733 | switch (cmd) { |
@@ -1752,6 +1749,7 @@ static int smack_msg_queue_msgctl(struct msg_queue *msq, int cmd) | |||
1752 | return -EINVAL; | 1749 | return -EINVAL; |
1753 | } | 1750 | } |
1754 | 1751 | ||
1752 | msp = smack_of_msq(msq); | ||
1755 | return smk_curacc(msp, may); | 1753 | return smk_curacc(msp, may); |
1756 | } | 1754 | } |
1757 | 1755 | ||