You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'audit.b21' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b21' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: (25 commits)
[PATCH] make set_loginuid obey audit_enabled
[PATCH] log more info for directory entry change events
[PATCH] fix AUDIT_FILTER_PREPEND handling
[PATCH] validate rule fields' types
[PATCH] audit: path-based rules
[PATCH] Audit of POSIX Message Queue Syscalls v.2
[PATCH] fix se_sen audit filter
[PATCH] deprecate AUDIT_POSSBILE
[PATCH] inline more audit helpers
[PATCH] proc_loginuid_write() uses simple_strtoul() on non-terminated array
[PATCH] update of IPC audit record cleanup
[PATCH] minor audit updates
[PATCH] fix audit_krule_to_{rule,data} return values
[PATCH] add filtering by ppid
[PATCH] log ppid
[PATCH] collect sid of those who send signals to auditd
[PATCH] execve argument logging
[PATCH] fix deadlocks in AUDIT_LIST/AUDIT_LIST_RULES
[PATCH] audit_panic() is audit-internal
[PATCH] inotify (5/5): update kernel documentation
...
Manual fixup of conflict in unclude/linux/inotify.h
This commit is contained in:
+18
-6
@@ -393,18 +393,30 @@ config INOTIFY
|
||||
bool "Inotify file change notification support"
|
||||
default y
|
||||
---help---
|
||||
Say Y here to enable inotify support and the associated system
|
||||
calls. Inotify is a file change notification system and a
|
||||
replacement for dnotify. Inotify fixes numerous shortcomings in
|
||||
dnotify and introduces several new features. It allows monitoring
|
||||
of both files and directories via a single open fd. Other features
|
||||
include multiple file events, one-shot support, and unmount
|
||||
Say Y here to enable inotify support. Inotify is a file change
|
||||
notification system and a replacement for dnotify. Inotify fixes
|
||||
numerous shortcomings in dnotify and introduces several new features
|
||||
including multiple file events, one-shot support, and unmount
|
||||
notification.
|
||||
|
||||
For more information, see Documentation/filesystems/inotify.txt
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config INOTIFY_USER
|
||||
bool "Inotify support for userspace"
|
||||
depends on INOTIFY
|
||||
default y
|
||||
---help---
|
||||
Say Y here to enable inotify support for userspace, including the
|
||||
associated system calls. Inotify allows monitoring of both files and
|
||||
directories via a single open fd. Events are read from the file
|
||||
descriptor, which is also select()- and poll()-able.
|
||||
|
||||
For more information, see Documentation/filesystems/inotify.txt
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config QUOTA
|
||||
bool "Quota support"
|
||||
help
|
||||
|
||||
@@ -13,6 +13,7 @@ obj-y := open.o read_write.o file_table.o buffer.o bio.o super.o \
|
||||
ioprio.o pnode.o drop_caches.o splice.o sync.o
|
||||
|
||||
obj-$(CONFIG_INOTIFY) += inotify.o
|
||||
obj-$(CONFIG_INOTIFY_USER) += inotify_user.o
|
||||
obj-$(CONFIG_EPOLL) += eventpoll.o
|
||||
obj-$(CONFIG_COMPAT) += compat.o compat_ioctl.o
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <linux/rmap.h>
|
||||
#include <linux/acct.h>
|
||||
#include <linux/cn_proc.h>
|
||||
#include <linux/audit.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/mmu_context.h>
|
||||
@@ -1085,6 +1086,11 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
|
||||
/* kernel module loader fixup */
|
||||
/* so we don't try to load run modprobe in kernel space. */
|
||||
set_fs(USER_DS);
|
||||
|
||||
retval = audit_bprm(bprm);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
retval = -ENOENT;
|
||||
for (try=0; try<2; try++) {
|
||||
read_lock(&binfmt_lock);
|
||||
|
||||
+309
-730
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1127,7 +1127,7 @@ out:
|
||||
if (likely(retval == 0)) {
|
||||
if (unlikely(current->audit_context && nd && nd->dentry &&
|
||||
nd->dentry->d_inode))
|
||||
audit_inode(name, nd->dentry->d_inode, flags);
|
||||
audit_inode(name, nd->dentry->d_inode);
|
||||
}
|
||||
out_fail:
|
||||
return retval;
|
||||
|
||||
@@ -633,7 +633,7 @@ asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
|
||||
dentry = file->f_dentry;
|
||||
inode = dentry->d_inode;
|
||||
|
||||
audit_inode(NULL, inode, 0);
|
||||
audit_inode(NULL, inode);
|
||||
|
||||
err = -EROFS;
|
||||
if (IS_RDONLY(inode))
|
||||
@@ -786,7 +786,7 @@ asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group)
|
||||
if (file) {
|
||||
struct dentry * dentry;
|
||||
dentry = file->f_dentry;
|
||||
audit_inode(NULL, dentry->d_inode, 0);
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
error = chown_common(dentry, user, group);
|
||||
fput(file);
|
||||
}
|
||||
|
||||
+3
-2
@@ -1019,8 +1019,8 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
|
||||
if (current != task)
|
||||
return -EPERM;
|
||||
|
||||
if (count > PAGE_SIZE)
|
||||
count = PAGE_SIZE;
|
||||
if (count >= PAGE_SIZE)
|
||||
count = PAGE_SIZE - 1;
|
||||
|
||||
if (*ppos != 0) {
|
||||
/* No partial writes. */
|
||||
@@ -1033,6 +1033,7 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
|
||||
if (copy_from_user(page, buf, count))
|
||||
goto out_free_page;
|
||||
|
||||
page[count] = '\0';
|
||||
loginuid = simple_strtoul(page, &tmp, 10);
|
||||
if (tmp == page) {
|
||||
length = -EINVAL;
|
||||
|
||||
+2
-2
@@ -242,7 +242,7 @@ sys_fsetxattr(int fd, char __user *name, void __user *value,
|
||||
if (!f)
|
||||
return error;
|
||||
dentry = f->f_dentry;
|
||||
audit_inode(NULL, dentry->d_inode, 0);
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
error = setxattr(dentry, name, value, size, flags);
|
||||
fput(f);
|
||||
return error;
|
||||
@@ -469,7 +469,7 @@ sys_fremovexattr(int fd, char __user *name)
|
||||
if (!f)
|
||||
return error;
|
||||
dentry = f->f_dentry;
|
||||
audit_inode(NULL, dentry->d_inode, 0);
|
||||
audit_inode(NULL, dentry->d_inode);
|
||||
error = removexattr(dentry, name);
|
||||
fput(f);
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user