FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH] src/t_attr_corruption: use security.capability instead of security.evm
@ 2019-02-25 19:10 jeffm
  2019-02-25 22:47 ` Darrick J. Wong
  0 siblings, 1 reply; 6+ messages in thread
From: jeffm @ 2019-02-25 19:10 UTC (permalink / raw)
  To: fstests; +Cc: darrick.wong, Jeff Mahoney

From: Jeff Mahoney <jeffm@suse.com>

src/t_attr_corruption uses the security.evm extended attribute because
it sorts before security.posix_acl_access.  The security.evm attribute
is a formatted structure and when passed an uninitialized buffer, it
will fail with EPERM.

We see test failures like:
    --- tests/generic/529.out2019-02-21 13:22:47.583406922 -0500
    +++ /opt/xfstests/results//generic/529.out.bad 2019-02-21 13:57:31.967406922 -0500
    @@ -1,2 +1,2 @@
     QA output created by 529
    -list attr: Numerical result out of range
    +set evm: Operation not permitted

This patch uses security.capability which also sorts where it needs to
do for the test and also accepts an unformatted buffer.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 src/t_attr_corruption.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/t_attr_corruption.c b/src/t_attr_corruption.c
index f26611f9..0c229dbc 100644
--- a/src/t_attr_corruption.c
+++ b/src/t_attr_corruption.c
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
 	if (ret)
 		die("set posix acl");
 
-	ret = fsetxattr(fd, "security.evm", buf, 1, 1);
+	ret = fsetxattr(fd, "security.capability", buf, 1, 1);
 	if (ret)
 		die("set evm");
 
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-26  3:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-25 19:10 [PATCH] src/t_attr_corruption: use security.capability instead of security.evm jeffm
2019-02-25 22:47 ` Darrick J. Wong
2019-02-25 23:26   ` Darrick J. Wong
2019-02-26  2:07     ` Xiao Yang
2019-02-26  3:33     ` Xiao Yang
2019-02-26  1:39   ` Jeff Mahoney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox