mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
selftests/landlock: Use an actual chardev for MAKE_CHAR audit test
By passing a (0, 0) device number, the audit test for LANDLOCK_ACCESS_FS_MAKE_CHAR was accidentally creating a whiteout object rather than a char device. In preparation to treating whiteout objects differently, use an actual character device instead. Signed-off-by: Günther Noack <gnoack@google.com> Link: https://patch.msgid.link/20260813093157.1436894-2-gnoack@google.com Signed-off-by: Mickaël Salaün <mic@digikod.net>
This commit is contained in:
parent
525acde34d
commit
173b1bd873
|
|
@ -7436,7 +7436,7 @@ TEST_F(audit_layout1, make_char)
|
|||
|
||||
enforce_fs(_metadata, ACCESS_ALL, NULL);
|
||||
|
||||
EXPECT_EQ(-1, mknod(file1_s1d3, S_IFCHR | 0644, 0));
|
||||
EXPECT_EQ(-1, mknod(file1_s1d3, S_IFCHR | 0644, makedev(7, 0)));
|
||||
EXPECT_EQ(EACCES, errno);
|
||||
EXPECT_EQ(0, matches_log_fs(_metadata, self->audit_fd, "fs\\.make_char",
|
||||
dir_s1d3));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user