Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d51374ad
Commit
d51374ad
authored
Aug 03, 2006
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] mark context of syscall entered with no rules as dummy
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
471a5c7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
include/linux/audit.h
include/linux/audit.h
+6
-0
kernel/auditsc.c
kernel/auditsc.c
+4
-2
No files found.
include/linux/audit.h
View file @
d51374ad
...
...
@@ -329,6 +329,11 @@ extern void __audit_inode(const char *name, const struct inode *inode);
extern
void
__audit_inode_child
(
const
char
*
dname
,
const
struct
inode
*
inode
,
const
struct
inode
*
parent
);
extern
void
__audit_inode_update
(
const
struct
inode
*
inode
);
static
inline
int
audit_dummy_context
(
void
)
{
void
*
p
=
current
->
audit_context
;
return
!
p
||
*
(
int
*
)
p
;
}
static
inline
void
audit_getname
(
const
char
*
name
)
{
if
(
unlikely
(
current
->
audit_context
))
...
...
@@ -416,6 +421,7 @@ extern int audit_n_rules;
#define audit_free(t) do { ; } while (0)
#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
#define audit_syscall_exit(f,r) do { ; } while (0)
#define audit_dummy_context() 1
#define audit_getname(n) do { ; } while (0)
#define audit_putname(n) do { ; } while (0)
#define __audit_inode(n,i) do { ; } while (0)
...
...
kernel/auditsc.c
View file @
d51374ad
...
...
@@ -177,6 +177,7 @@ struct audit_aux_data_path {
/* The per-task audit context. */
struct
audit_context
{
int
dummy
;
/* must be the first element */
int
in_syscall
;
/* 1 if task is in a syscall */
enum
audit_state
state
;
unsigned
int
serial
;
/* serial number for record */
...
...
@@ -517,7 +518,7 @@ static inline struct audit_context *audit_get_context(struct task_struct *tsk,
context
->
return_valid
=
return_valid
;
context
->
return_code
=
return_code
;
if
(
context
->
in_syscall
&&
!
context
->
auditable
)
{
if
(
context
->
in_syscall
&&
!
context
->
dummy
&&
!
context
->
auditable
)
{
enum
audit_state
state
;
state
=
audit_filter_syscall
(
tsk
,
context
,
&
audit_filter_list
[
AUDIT_FILTER_EXIT
]);
...
...
@@ -1069,7 +1070,8 @@ void audit_syscall_entry(int arch, int major,
context
->
argv
[
3
]
=
a4
;
state
=
context
->
state
;
if
(
state
==
AUDIT_SETUP_CONTEXT
||
state
==
AUDIT_BUILD_CONTEXT
)
context
->
dummy
=
!
audit_n_rules
;
if
(
!
context
->
dummy
&&
(
state
==
AUDIT_SETUP_CONTEXT
||
state
==
AUDIT_BUILD_CONTEXT
))
state
=
audit_filter_syscall
(
tsk
,
context
,
&
audit_filter_list
[
AUDIT_FILTER_ENTRY
]);
if
(
likely
(
state
==
AUDIT_DISABLED
))
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment