diff options
Diffstat (limited to 'security/selinux/avc.c')
-rw-r--r-- | security/selinux/avc.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index e8529e2f51e5..187964e88af1 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -568,10 +568,11 @@ void avc_audit(u32 ssid, u32 tsid, | |||
568 | audit_log_format(ab, " capability=%d", a->u.cap); | 568 | audit_log_format(ab, " capability=%d", a->u.cap); |
569 | break; | 569 | break; |
570 | case AVC_AUDIT_DATA_FS: | 570 | case AVC_AUDIT_DATA_FS: |
571 | if (a->u.fs.dentry) { | 571 | if (a->u.fs.path.dentry) { |
572 | struct dentry *dentry = a->u.fs.dentry; | 572 | struct dentry *dentry = a->u.fs.path.dentry; |
573 | if (a->u.fs.mnt) { | 573 | if (a->u.fs.path.mnt) { |
574 | audit_log_d_path(ab, "path=", dentry, a->u.fs.mnt); | 574 | audit_log_d_path(ab, "path=", |
575 | &a->u.fs.path); | ||
575 | } else { | 576 | } else { |
576 | audit_log_format(ab, " name="); | 577 | audit_log_format(ab, " name="); |
577 | audit_log_untrustedstring(ab, dentry->d_name.name); | 578 | audit_log_untrustedstring(ab, dentry->d_name.name); |
@@ -626,8 +627,12 @@ void avc_audit(u32 ssid, u32 tsid, | |||
626 | case AF_UNIX: | 627 | case AF_UNIX: |
627 | u = unix_sk(sk); | 628 | u = unix_sk(sk); |
628 | if (u->dentry) { | 629 | if (u->dentry) { |
630 | struct path path = { | ||
631 | .dentry = u->dentry, | ||
632 | .mnt = u->mnt | ||
633 | }; | ||
629 | audit_log_d_path(ab, "path=", | 634 | audit_log_d_path(ab, "path=", |
630 | u->dentry, u->mnt); | 635 | &path); |
631 | break; | 636 | break; |
632 | } | 637 | } |
633 | if (!u->addr) | 638 | if (!u->addr) |