Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333895
b: refs/heads/master
c: c43a25a
h: refs/heads/master
i:
  333893: e91d2f8
  333891: dd2deb7
  333887: 0a959c9
v: v3
  • Loading branch information
Jeff Layton authored and Al Viro committed Oct 12, 2012
1 parent e2baf5e commit aa3ece0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9cec9d68ae53aae60b4a1fca4505c75a1d026392
refs/heads/master: c43a25abba97c7d87131e71db6be24b24d7791a5
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static int btrfs_may_delete(struct inode *dir,struct dentry *victim,int isdir)
return -ENOENT;

BUG_ON(victim->d_parent->d_inode != dir);
audit_inode_child(victim, dir);
audit_inode_child(dir, victim);

error = inode_permission(dir, MAY_WRITE | MAY_EXEC);
if (error)
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2176,7 +2176,7 @@ static int may_delete(struct inode *dir,struct dentry *victim,int isdir)
return -ENOENT;

BUG_ON(victim->d_parent->d_inode != dir);
audit_inode_child(victim, dir);
audit_inode_child(dir, victim);

error = inode_permission(dir, MAY_WRITE | MAY_EXEC);
if (error)
Expand Down
18 changes: 9 additions & 9 deletions trunk/include/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ extern void __audit_syscall_exit(int ret_success, long ret_value);
extern void __audit_getname(const char *name);
extern void audit_putname(const char *name);
extern void __audit_inode(const char *name, const struct dentry *dentry);
extern void __audit_inode_child(const struct dentry *dentry,
const struct inode *parent);
extern void __audit_inode_child(const struct inode *parent,
const struct dentry *dentry);
extern void __audit_seccomp(unsigned long syscall, long signr, int code);
extern void __audit_ptrace(struct task_struct *t);

Expand Down Expand Up @@ -504,10 +504,10 @@ static inline void audit_inode(const char *name, const struct dentry *dentry) {
if (unlikely(!audit_dummy_context()))
__audit_inode(name, dentry);
}
static inline void audit_inode_child(const struct dentry *dentry,
const struct inode *parent) {
static inline void audit_inode_child(const struct inode *parent,
const struct dentry *dentry) {
if (unlikely(!audit_dummy_context()))
__audit_inode_child(dentry, parent);
__audit_inode_child(parent, dentry);
}
void audit_core_dumps(long signr);

Expand Down Expand Up @@ -657,13 +657,13 @@ static inline void audit_putname(const char *name)
{ }
static inline void __audit_inode(const char *name, const struct dentry *dentry)
{ }
static inline void __audit_inode_child(const struct dentry *dentry,
const struct inode *parent)
static inline void __audit_inode_child(const struct inode *parent,
const struct dentry *dentry)
{ }
static inline void audit_inode(const char *name, const struct dentry *dentry)
{ }
static inline void audit_inode_child(const struct dentry *dentry,
const struct inode *parent)
static inline void audit_inode_child(const struct inode *parent,
const struct dentry *dentry)
{ }
static inline void audit_core_dumps(long signr)
{ }
Expand Down
8 changes: 4 additions & 4 deletions trunk/include/linux/fsnotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,

if (source)
fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0);
audit_inode_child(moved, new_dir);
audit_inode_child(new_dir, moved);
}

/*
Expand Down Expand Up @@ -155,7 +155,7 @@ static inline void fsnotify_inoderemove(struct inode *inode)
*/
static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
{
audit_inode_child(dentry, inode);
audit_inode_child(inode, dentry);

fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0);
}
Expand All @@ -168,7 +168,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct dentry *new_dentry)
{
fsnotify_link_count(inode);
audit_inode_child(new_dentry, dir);
audit_inode_child(dir, new_dentry);

fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0);
}
Expand All @@ -181,7 +181,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry)
__u32 mask = (FS_CREATE | FS_ISDIR);
struct inode *d_inode = dentry->d_inode;

audit_inode_child(dentry, inode);
audit_inode_child(inode, dentry);

fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0);
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2166,9 +2166,9 @@ void __audit_inode(const char *name, const struct dentry *dentry)
}

/**
* audit_inode_child - collect inode info for created/removed objects
* @dentry: dentry being audited
* __audit_inode_child - collect inode info for created/removed objects
* @parent: inode of dentry parent
* @dentry: dentry being audited
*
* For syscalls that create or remove filesystem objects, audit_inode
* can only collect information for the filesystem object's parent.
Expand All @@ -2178,8 +2178,8 @@ void __audit_inode(const char *name, const struct dentry *dentry)
* must be hooked prior, in order to capture the target inode during
* unsuccessful attempts.
*/
void __audit_inode_child(const struct dentry *dentry,
const struct inode *parent)
void __audit_inode_child(const struct inode *parent,
const struct dentry *dentry)
{
struct audit_context *context = current->audit_context;
const char *found_parent = NULL, *found_child = NULL;
Expand Down

0 comments on commit aa3ece0

Please sign in to comment.