Skip to content

Commit 0ead0d0

Browse files
Christian Braunersmb49
authored andcommitted
landlock: Use square brackets around "landlock-ruleset"
BugLink: https://bugs.launchpad.net/bugs/1969110 commit aea0b9f upstream. Make the name of the anon inode fd "[landlock-ruleset]" instead of "landlock-ruleset". This is minor but most anon inode fds already carry square brackets around their name: [eventfd] [eventpoll] [fanotify] [fscontext] [io_uring] [pidfd] [signalfd] [timerfd] [userfaultfd] For the sake of consistency lets do the same for the landlock-ruleset anon inode fd that comes with landlock. We did the same in 1cdc415 ("uapi, fsopen: use square brackets around "fscontext" [ver #2]") for the new mount api. Cc: [email protected] Signed-off-by: Christian Brauner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Mickaël Salaün <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 3d4b396a616d0d67bf95d6823ad1197f6247292e) Signed-off-by: Paolo Pisati <[email protected]>
1 parent 2fb85ca commit 0ead0d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/landlock/syscalls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ SYSCALL_DEFINE3(landlock_create_ruleset,
192192
return PTR_ERR(ruleset);
193193

194194
/* Creates anonymous FD referring to the ruleset. */
195-
ruleset_fd = anon_inode_getfd("landlock-ruleset", &ruleset_fops,
195+
ruleset_fd = anon_inode_getfd("[landlock-ruleset]", &ruleset_fops,
196196
ruleset, O_RDWR | O_CLOEXEC);
197197
if (ruleset_fd < 0)
198198
landlock_put_ruleset(ruleset);

0 commit comments

Comments
 (0)