-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to tie upper bits of syscall bitmap in audit rules to kernel-defined sets of syscalls. Infrastructure, a couple of classes (with 32bit counterparts for biarch targets) and actual tie-in on i386, amd64 and ia64. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
- Loading branch information
Al Viro
committed
Jul 1, 2006
1 parent
6e5a2d1
commit b915543
Showing
14 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <linux/init.h> | ||
#include <linux/types.h> | ||
#include <linux/audit.h> | ||
#include <asm/unistd.h> | ||
|
||
static unsigned dir_class[] = { | ||
#include <asm-generic/audit_dir_write.h> | ||
~0U | ||
}; | ||
|
||
static unsigned chattr_class[] = { | ||
#include <asm-generic/audit_change_attr.h> | ||
~0U | ||
}; | ||
|
||
static int __init audit_classes_init(void) | ||
{ | ||
audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
return 0; | ||
} | ||
|
||
__initcall(audit_classes_init); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <asm-i386/unistd.h> | ||
|
||
unsigned ia32_dir_class[] = { | ||
#include <asm-generic/audit_dir_write.h> | ||
~0U | ||
}; | ||
|
||
unsigned ia32_chattr_class[] = { | ||
#include <asm-generic/audit_change_attr.h> | ||
~0U | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <linux/init.h> | ||
#include <linux/types.h> | ||
#include <linux/audit.h> | ||
#include <asm/unistd.h> | ||
|
||
static unsigned dir_class[] = { | ||
#include <asm-generic/audit_dir_write.h> | ||
~0U | ||
}; | ||
|
||
static unsigned chattr_class[] = { | ||
#include <asm-generic/audit_change_attr.h> | ||
~0U | ||
}; | ||
|
||
static int __init audit_classes_init(void) | ||
{ | ||
#ifdef CONFIG_IA32_SUPPORT | ||
extern __u32 ia32_dir_class[]; | ||
extern __u32 ia32_chattr_class[]; | ||
audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | ||
audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | ||
#endif | ||
audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
return 0; | ||
} | ||
|
||
__initcall(audit_classes_init); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <asm-i386/unistd.h> | ||
|
||
unsigned ia32_dir_class[] = { | ||
#include <asm-generic/audit_dir_write.h> | ||
~0U | ||
}; | ||
|
||
unsigned ia32_chattr_class[] = { | ||
#include <asm-generic/audit_change_attr.h> | ||
~0U | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <linux/init.h> | ||
#include <linux/types.h> | ||
#include <linux/audit.h> | ||
#include <asm/unistd.h> | ||
|
||
static unsigned dir_class[] = { | ||
#include <asm-generic/audit_dir_write.h> | ||
~0U | ||
}; | ||
|
||
static unsigned chattr_class[] = { | ||
#include <asm-generic/audit_change_attr.h> | ||
~0U | ||
}; | ||
|
||
static int __init audit_classes_init(void) | ||
{ | ||
#ifdef CONFIG_IA32_EMULATION | ||
extern __u32 ia32_dir_class[]; | ||
extern __u32 ia32_chattr_class[]; | ||
audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | ||
audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | ||
#endif | ||
audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
return 0; | ||
} | ||
|
||
__initcall(audit_classes_init); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
__NR_chmod, | ||
__NR_fchmod, | ||
__NR_chown, | ||
__NR_fchown, | ||
__NR_lchown, | ||
__NR_setxattr, | ||
__NR_lsetxattr, | ||
__NR_fsetxattr, | ||
__NR_removexattr, | ||
__NR_lremovexattr, | ||
__NR_fremovexattr, | ||
__NR_fchownat, | ||
__NR_fchmodat, | ||
#ifdef __NR_chown32 | ||
__NR_chown32, | ||
__NR_fchown32, | ||
__NR_lchown32, | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
__NR_rename, | ||
__NR_mkdir, | ||
__NR_rmdir, | ||
__NR_creat, | ||
__NR_link, | ||
__NR_unlink, | ||
__NR_symlink, | ||
__NR_mknod, | ||
__NR_mkdirat, | ||
__NR_mknodat, | ||
__NR_unlinkat, | ||
__NR_renameat, | ||
__NR_linkat, | ||
__NR_symlinkat, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters