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
5ac3a9c2
Commit
5ac3a9c2
authored
Jul 16, 2006
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] don't bother with aux entires for dummy context
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d51374ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
fs/namei.c
fs/namei.c
+2
-2
include/linux/audit.h
include/linux/audit.h
+11
-11
kernel/auditsc.c
kernel/auditsc.c
+3
-3
No files found.
fs/namei.c
View file @
5ac3a9c2
...
...
@@ -159,7 +159,7 @@ char * getname(const char __user * filename)
#ifdef CONFIG_AUDITSYSCALL
void
putname
(
const
char
*
name
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
audit_putname
(
name
);
else
__putname
(
name
);
...
...
@@ -1125,7 +1125,7 @@ static int fastcall do_path_lookup(int dfd, const char *name,
retval
=
link_path_walk
(
name
,
nd
);
out:
if
(
likely
(
retval
==
0
))
{
if
(
unlikely
(
current
->
audit_context
&&
nd
&&
nd
->
dentry
&&
if
(
unlikely
(
!
audit_dummy_context
()
&&
nd
&&
nd
->
dentry
&&
nd
->
dentry
->
d_inode
))
audit_inode
(
name
,
nd
->
dentry
->
d_inode
);
}
...
...
include/linux/audit.h
View file @
5ac3a9c2
...
...
@@ -336,21 +336,21 @@ static inline int audit_dummy_context(void)
}
static
inline
void
audit_getname
(
const
char
*
name
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
__audit_getname
(
name
);
}
static
inline
void
audit_inode
(
const
char
*
name
,
const
struct
inode
*
inode
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
__audit_inode
(
name
,
inode
);
}
static
inline
void
audit_inode_child
(
const
char
*
dname
,
const
struct
inode
*
inode
,
const
struct
inode
*
parent
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
__audit_inode_child
(
dname
,
inode
,
parent
);
}
static
inline
void
audit_inode_update
(
const
struct
inode
*
inode
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
__audit_inode_update
(
inode
);
}
...
...
@@ -375,43 +375,43 @@ extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat);
static
inline
int
audit_ipc_obj
(
struct
kern_ipc_perm
*
ipcp
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_ipc_obj
(
ipcp
);
return
0
;
}
static
inline
int
audit_ipc_set_perm
(
unsigned
long
qbytes
,
uid_t
uid
,
gid_t
gid
,
mode_t
mode
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_ipc_set_perm
(
qbytes
,
uid
,
gid
,
mode
);
return
0
;
}
static
inline
int
audit_mq_open
(
int
oflag
,
mode_t
mode
,
struct
mq_attr
__user
*
u_attr
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_open
(
oflag
,
mode
,
u_attr
);
return
0
;
}
static
inline
int
audit_mq_timedsend
(
mqd_t
mqdes
,
size_t
msg_len
,
unsigned
int
msg_prio
,
const
struct
timespec
__user
*
u_abs_timeout
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_timedsend
(
mqdes
,
msg_len
,
msg_prio
,
u_abs_timeout
);
return
0
;
}
static
inline
int
audit_mq_timedreceive
(
mqd_t
mqdes
,
size_t
msg_len
,
unsigned
int
__user
*
u_msg_prio
,
const
struct
timespec
__user
*
u_abs_timeout
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_timedreceive
(
mqdes
,
msg_len
,
u_msg_prio
,
u_abs_timeout
);
return
0
;
}
static
inline
int
audit_mq_notify
(
mqd_t
mqdes
,
const
struct
sigevent
__user
*
u_notification
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_notify
(
mqdes
,
u_notification
);
return
0
;
}
static
inline
int
audit_mq_getsetattr
(
mqd_t
mqdes
,
struct
mq_attr
*
mqstat
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_getsetattr
(
mqdes
,
mqstat
);
return
0
;
}
...
...
kernel/auditsc.c
View file @
5ac3a9c2
...
...
@@ -1676,7 +1676,7 @@ int audit_bprm(struct linux_binprm *bprm)
unsigned
long
p
,
next
;
void
*
to
;
if
(
likely
(
!
audit_enabled
||
!
context
))
if
(
likely
(
!
audit_enabled
||
!
context
||
context
->
dummy
))
return
0
;
ax
=
kmalloc
(
sizeof
(
*
ax
)
+
PAGE_SIZE
*
MAX_ARG_PAGES
-
bprm
->
p
,
...
...
@@ -1714,7 +1714,7 @@ int audit_socketcall(int nargs, unsigned long *args)
struct
audit_aux_data_socketcall
*
ax
;
struct
audit_context
*
context
=
current
->
audit_context
;
if
(
likely
(
!
context
))
if
(
likely
(
!
context
||
context
->
dummy
))
return
0
;
ax
=
kmalloc
(
sizeof
(
*
ax
)
+
nargs
*
sizeof
(
unsigned
long
),
GFP_KERNEL
);
...
...
@@ -1742,7 +1742,7 @@ int audit_sockaddr(int len, void *a)
struct
audit_aux_data_sockaddr
*
ax
;
struct
audit_context
*
context
=
current
->
audit_context
;
if
(
likely
(
!
context
))
if
(
likely
(
!
context
||
context
->
dummy
))
return
0
;
ax
=
kmalloc
(
sizeof
(
*
ax
)
+
len
,
GFP_KERNEL
);
...
...
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