Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
Tomeu Vizoso
linux
Commits
3b370b21
Commit
3b370b21
authored
7 years ago
by
Jeff Layton
Browse files
Options
Downloads
Patches
Plain Diff
IMA: switch IMA over to new i_version API
Signed-off-by:
Jeff Layton
<
jlayton@redhat.com
>
parent
f0e28280
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
security/integrity/ima/ima_api.c
+2
-1
2 additions, 1 deletion
security/integrity/ima/ima_api.c
security/integrity/ima/ima_main.c
+2
-1
2 additions, 1 deletion
security/integrity/ima/ima_main.c
with
4 additions
and
2 deletions
security/integrity/ima/ima_api.c
+
2
−
1
View file @
3b370b21
...
...
@@ -18,6 +18,7 @@
#include
<linux/fs.h>
#include
<linux/xattr.h>
#include
<linux/evm.h>
#include
<linux/iversion.h>
#include
"ima.h"
...
...
@@ -215,7 +216,7 @@ int ima_collect_measurement(struct integrity_iint_cache *iint,
* which do not support i_version, support is limited to an initial
* measurement/appraisal/audit.
*/
i_version
=
file_inode
(
file
)
->
i_version
;
i_version
=
inode_query_iversion
(
inode
)
;
hash
.
hdr
.
algo
=
algo
;
/* Initialize hash digest to 0's in case of failure */
...
...
This diff is collapsed.
Click to expand it.
security/integrity/ima/ima_main.c
+
2
−
1
View file @
3b370b21
...
...
@@ -24,6 +24,7 @@
#include
<linux/slab.h>
#include
<linux/xattr.h>
#include
<linux/ima.h>
#include
<linux/iversion.h>
#include
"ima.h"
...
...
@@ -128,7 +129,7 @@ static void ima_check_last_writer(struct integrity_iint_cache *iint,
inode_lock
(
inode
);
if
(
atomic_read
(
&
inode
->
i_writecount
)
==
1
)
{
if
(
!
IS_I_VERSION
(
inode
)
||
(
iint
->
version
!=
inode
->
i_
version
)
||
inode_cmp_i
version
(
inode
,
iint
->
version
)
||
(
iint
->
flags
&
IMA_NEW_FILE
))
{
iint
->
flags
&=
~
(
IMA_DONE_MASK
|
IMA_NEW_FILE
);
iint
->
measured_pcrs
=
0
;
...
...
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