diff options
author | Jan Blunck <jblunck@suse.de> | 2008-02-14 22:38:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 00:17:08 -0500 |
commit | 44707fdf5938ad269ea5d6c5744d82f6a7328746 (patch) | |
tree | 7eb1704418eb41b859ad24bc48f6400135474d87 /security/selinux/avc.c | |
parent | a03a8a709a0c34b61b7aea1d54a0473a6b941fdb (diff) |
d_path: Use struct path in struct avc_audit_data
audit_log_d_path() is a d_path() wrapper that is used by the audit code. To
use a struct path in audit_log_d_path() I need to embed it into struct
avc_audit_data.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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) |