diff options
Diffstat (limited to 'security/smack/smack_lsm.c')
-rw-r--r-- | security/smack/smack_lsm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index c33b6bb9b6dd..fdfeaa2f28ec 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/ip.h> | 25 | #include <linux/ip.h> |
26 | #include <linux/tcp.h> | 26 | #include <linux/tcp.h> |
27 | #include <linux/udp.h> | 27 | #include <linux/udp.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
29 | #include <linux/pipe_fs_i.h> | 30 | #include <linux/pipe_fs_i.h> |
30 | #include <net/netlabel.h> | 31 | #include <net/netlabel.h> |
@@ -157,12 +158,12 @@ static int smack_ptrace_traceme(struct task_struct *ptp) | |||
157 | * | 158 | * |
158 | * Returns 0 on success, error code otherwise. | 159 | * Returns 0 on success, error code otherwise. |
159 | */ | 160 | */ |
160 | static int smack_syslog(int type) | 161 | static int smack_syslog(int type, bool from_file) |
161 | { | 162 | { |
162 | int rc; | 163 | int rc; |
163 | char *sp = current_security(); | 164 | char *sp = current_security(); |
164 | 165 | ||
165 | rc = cap_syslog(type); | 166 | rc = cap_syslog(type, from_file); |
166 | if (rc != 0) | 167 | if (rc != 0) |
167 | return rc; | 168 | return rc; |
168 | 169 | ||
@@ -387,7 +388,7 @@ static int smack_sb_umount(struct vfsmount *mnt, int flags) | |||
387 | struct smk_audit_info ad; | 388 | struct smk_audit_info ad; |
388 | 389 | ||
389 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_FS); | 390 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_FS); |
390 | smk_ad_setfield_u_fs_path_dentry(&ad, mnt->mnt_mountpoint); | 391 | smk_ad_setfield_u_fs_path_dentry(&ad, mnt->mnt_root); |
391 | smk_ad_setfield_u_fs_path_mnt(&ad, mnt); | 392 | smk_ad_setfield_u_fs_path_mnt(&ad, mnt); |
392 | 393 | ||
393 | sbp = mnt->mnt_sb->s_security; | 394 | sbp = mnt->mnt_sb->s_security; |
@@ -2602,7 +2603,7 @@ static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
2602 | #ifdef CONFIG_AUDIT | 2603 | #ifdef CONFIG_AUDIT |
2603 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NET); | 2604 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NET); |
2604 | ad.a.u.net.family = sk->sk_family; | 2605 | ad.a.u.net.family = sk->sk_family; |
2605 | ad.a.u.net.netif = skb->iif; | 2606 | ad.a.u.net.netif = skb->skb_iif; |
2606 | ipv4_skb_to_auditdata(skb, &ad.a, NULL); | 2607 | ipv4_skb_to_auditdata(skb, &ad.a, NULL); |
2607 | #endif | 2608 | #endif |
2608 | /* | 2609 | /* |
@@ -2757,7 +2758,7 @@ static int smack_inet_conn_request(struct sock *sk, struct sk_buff *skb, | |||
2757 | #ifdef CONFIG_AUDIT | 2758 | #ifdef CONFIG_AUDIT |
2758 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NET); | 2759 | smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NET); |
2759 | ad.a.u.net.family = family; | 2760 | ad.a.u.net.family = family; |
2760 | ad.a.u.net.netif = skb->iif; | 2761 | ad.a.u.net.netif = skb->skb_iif; |
2761 | ipv4_skb_to_auditdata(skb, &ad.a, NULL); | 2762 | ipv4_skb_to_auditdata(skb, &ad.a, NULL); |
2762 | #endif | 2763 | #endif |
2763 | /* | 2764 | /* |