Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
0a73dccc
Commit
0a73dccc
authored
Jun 05, 2006
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] validate rule fields' types
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
f368c07d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
9 deletions
+48
-9
kernel/auditfilter.c
kernel/auditfilter.c
+48
-9
No files found.
kernel/auditfilter.c
View file @
0a73dccc
...
@@ -348,17 +348,31 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule)
...
@@ -348,17 +348,31 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule)
f
->
val
=
rule
->
values
[
i
];
f
->
val
=
rule
->
values
[
i
];
err
=
-
EINVAL
;
err
=
-
EINVAL
;
if
(
f
->
type
&
AUDIT_UNUSED_BITS
)
goto
exit_free
;
switch
(
f
->
type
)
{
switch
(
f
->
type
)
{
case
AUDIT_SE_USER
:
default:
case
AUDIT_SE_ROLE
:
case
AUDIT_SE_TYPE
:
case
AUDIT_SE_SEN
:
case
AUDIT_SE_CLR
:
case
AUDIT_WATCH
:
goto
exit_free
;
goto
exit_free
;
case
AUDIT_PID
:
case
AUDIT_UID
:
case
AUDIT_EUID
:
case
AUDIT_SUID
:
case
AUDIT_FSUID
:
case
AUDIT_GID
:
case
AUDIT_EGID
:
case
AUDIT_SGID
:
case
AUDIT_FSGID
:
case
AUDIT_LOGINUID
:
case
AUDIT_PERS
:
case
AUDIT_ARCH
:
case
AUDIT_MSGTYPE
:
case
AUDIT_DEVMAJOR
:
case
AUDIT_DEVMINOR
:
case
AUDIT_EXIT
:
case
AUDIT_SUCCESS
:
case
AUDIT_ARG0
:
case
AUDIT_ARG1
:
case
AUDIT_ARG2
:
case
AUDIT_ARG3
:
break
;
case
AUDIT_INODE
:
case
AUDIT_INODE
:
err
=
audit_to_inode
(
&
entry
->
rule
,
f
);
err
=
audit_to_inode
(
&
entry
->
rule
,
f
);
if
(
err
)
if
(
err
)
...
@@ -432,6 +446,29 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
...
@@ -432,6 +446,29 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
f
->
se_str
=
NULL
;
f
->
se_str
=
NULL
;
f
->
se_rule
=
NULL
;
f
->
se_rule
=
NULL
;
switch
(
f
->
type
)
{
switch
(
f
->
type
)
{
case
AUDIT_PID
:
case
AUDIT_UID
:
case
AUDIT_EUID
:
case
AUDIT_SUID
:
case
AUDIT_FSUID
:
case
AUDIT_GID
:
case
AUDIT_EGID
:
case
AUDIT_SGID
:
case
AUDIT_FSGID
:
case
AUDIT_LOGINUID
:
case
AUDIT_PERS
:
case
AUDIT_ARCH
:
case
AUDIT_MSGTYPE
:
case
AUDIT_PPID
:
case
AUDIT_DEVMAJOR
:
case
AUDIT_DEVMINOR
:
case
AUDIT_EXIT
:
case
AUDIT_SUCCESS
:
case
AUDIT_ARG0
:
case
AUDIT_ARG1
:
case
AUDIT_ARG2
:
case
AUDIT_ARG3
:
break
;
case
AUDIT_SE_USER
:
case
AUDIT_SE_USER
:
case
AUDIT_SE_ROLE
:
case
AUDIT_SE_ROLE
:
case
AUDIT_SE_TYPE
:
case
AUDIT_SE_TYPE
:
...
@@ -474,6 +511,8 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
...
@@ -474,6 +511,8 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
if
(
err
)
if
(
err
)
goto
exit_free
;
goto
exit_free
;
break
;
break
;
default:
goto
exit_free
;
}
}
}
}
...
...
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