Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Louis-Alexis Eyraud
linux
Commits
8bea8f86
Commit
8bea8f86
authored
3 months ago
by
Paul Moore
Browse files
Options
Downloads
Plain Diff
Automated merge of 'dev' into 'next'
* dev: audit: fix suffixed '/' filename matching
parents
d9381508
e92eebb0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/auditfilter.c
+11
-4
11 additions, 4 deletions
kernel/auditfilter.c
with
11 additions
and
4 deletions
kernel/auditfilter.c
+
11
−
4
View file @
8bea8f86
...
...
@@ -1319,13 +1319,20 @@ int audit_compare_dname_path(const struct qstr *dname, const char *path, int par
if
(
pathlen
<
dlen
)
return
1
;
parentlen
=
parentlen
==
AUDIT_NAME_FULL
?
parent_len
(
path
)
:
parentlen
;
if
(
pathlen
-
parentlen
!=
dlen
)
return
1
;
if
(
parentlen
==
AUDIT_NAME_FULL
)
parentlen
=
parent_len
(
path
);
p
=
path
+
parentlen
;
return
strncmp
(
p
,
dname
->
name
,
dlen
);
/* handle trailing slashes */
pathlen
-=
parentlen
;
while
(
p
[
pathlen
-
1
]
==
'/'
)
pathlen
--
;
if
(
pathlen
!=
dlen
)
return
1
;
return
memcmp
(
p
,
dname
->
name
,
dlen
);
}
int
audit_filter
(
int
msgtype
,
unsigned
int
listtype
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment