new helper: audit_file()
... for situations when we don't have any candidate in pathnames - basically, in descriptor-based syscalls. [Folded the build fix for !CONFIG_AUDITSYSCALL configs from Chen Gang] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -516,7 +516,7 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode)
|
||||
int err = -EBADF;
|
||||
|
||||
if (f.file) {
|
||||
audit_inode(NULL, f.file->f_path.dentry, 0);
|
||||
audit_file(f.file);
|
||||
err = chmod_common(&f.file->f_path, mode);
|
||||
fdput(f);
|
||||
}
|
||||
@@ -642,7 +642,7 @@ SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group)
|
||||
error = mnt_want_write_file(f.file);
|
||||
if (error)
|
||||
goto out_fput;
|
||||
audit_inode(NULL, f.file->f_path.dentry, 0);
|
||||
audit_file(f.file);
|
||||
error = chown_common(&f.file->f_path, user, group);
|
||||
mnt_drop_write_file(f.file);
|
||||
out_fput:
|
||||
|
Reference in New Issue
Block a user