diff options
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 267e484f0198..f3a461c0970a 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -250,7 +250,6 @@ struct audit_context { | |||
250 | #endif | 250 | #endif |
251 | }; | 251 | }; |
252 | 252 | ||
253 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) | ||
254 | static inline int open_arg(int flags, int mask) | 253 | static inline int open_arg(int flags, int mask) |
255 | { | 254 | { |
256 | int n = ACC_MODE(flags); | 255 | int n = ACC_MODE(flags); |
@@ -1989,7 +1988,6 @@ void __audit_inode(const char *name, const struct dentry *dentry) | |||
1989 | 1988 | ||
1990 | /** | 1989 | /** |
1991 | * audit_inode_child - collect inode info for created/removed objects | 1990 | * audit_inode_child - collect inode info for created/removed objects |
1992 | * @dname: inode's dentry name | ||
1993 | * @dentry: dentry being audited | 1991 | * @dentry: dentry being audited |
1994 | * @parent: inode of dentry parent | 1992 | * @parent: inode of dentry parent |
1995 | * | 1993 | * |
@@ -2001,13 +1999,14 @@ void __audit_inode(const char *name, const struct dentry *dentry) | |||
2001 | * must be hooked prior, in order to capture the target inode during | 1999 | * must be hooked prior, in order to capture the target inode during |
2002 | * unsuccessful attempts. | 2000 | * unsuccessful attempts. |
2003 | */ | 2001 | */ |
2004 | void __audit_inode_child(const char *dname, const struct dentry *dentry, | 2002 | void __audit_inode_child(const struct dentry *dentry, |
2005 | const struct inode *parent) | 2003 | const struct inode *parent) |
2006 | { | 2004 | { |
2007 | int idx; | 2005 | int idx; |
2008 | struct audit_context *context = current->audit_context; | 2006 | struct audit_context *context = current->audit_context; |
2009 | const char *found_parent = NULL, *found_child = NULL; | 2007 | const char *found_parent = NULL, *found_child = NULL; |
2010 | const struct inode *inode = dentry->d_inode; | 2008 | const struct inode *inode = dentry->d_inode; |
2009 | const char *dname = dentry->d_name.name; | ||
2011 | int dirlen = 0; | 2010 | int dirlen = 0; |
2012 | 2011 | ||
2013 | if (!context->in_syscall) | 2012 | if (!context->in_syscall) |
@@ -2015,9 +2014,6 @@ void __audit_inode_child(const char *dname, const struct dentry *dentry, | |||
2015 | 2014 | ||
2016 | if (inode) | 2015 | if (inode) |
2017 | handle_one(inode); | 2016 | handle_one(inode); |
2018 | /* determine matching parent */ | ||
2019 | if (!dname) | ||
2020 | goto add_names; | ||
2021 | 2017 | ||
2022 | /* parent is more likely, look for it first */ | 2018 | /* parent is more likely, look for it first */ |
2023 | for (idx = 0; idx < context->name_count; idx++) { | 2019 | for (idx = 0; idx < context->name_count; idx++) { |