diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-27 14:26:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-27 14:26:47 -0700 |
commit | 29cbaa3e60dfe48e341a3a5ce1c2d8f3d9e9667c (patch) | |
tree | 313f2b5436ced50e76a706d0edd41386305db75d | |
parent | 50d602d81f35621042fa0cdae25808662caffda8 (diff) | |
parent | aea0b9f2486da8497f35c7114b764bf55e17c7ea (diff) | |
download | linux-29cbaa3e60dfe48e341a3a5ce1c2d8f3d9e9667c.tar.bz2 |
Merge tag 'landlock-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux
Pull landlock updates from Mickaël Salaün:
"These two commits contain a minor fix for the sandboxer sample, and a
Landlock ruleset FD name standardization"
* tag 'landlock-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
landlock: Use square brackets around "landlock-ruleset"
samples/landlock: Fix path_list memory leak
-rw-r--r-- | samples/landlock/sandboxer.c | 1 | ||||
-rw-r--r-- | security/landlock/syscalls.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/samples/landlock/sandboxer.c b/samples/landlock/sandboxer.c index 7a15910d2171..8859fc193542 100644 --- a/samples/landlock/sandboxer.c +++ b/samples/landlock/sandboxer.c @@ -134,6 +134,7 @@ static int populate_ruleset( ret = 0; out_free_name: + free(path_list); free(env_path_name); return ret; } diff --git a/security/landlock/syscalls.c b/security/landlock/syscalls.c index 32396962f04d..7e27ce394020 100644 --- a/security/landlock/syscalls.c +++ b/security/landlock/syscalls.c @@ -192,7 +192,7 @@ SYSCALL_DEFINE3(landlock_create_ruleset, return PTR_ERR(ruleset); /* Creates anonymous FD referring to the ruleset. */ - ruleset_fd = anon_inode_getfd("landlock-ruleset", &ruleset_fops, + ruleset_fd = anon_inode_getfd("[landlock-ruleset]", &ruleset_fops, ruleset, O_RDWR | O_CLOEXEC); if (ruleset_fd < 0) landlock_put_ruleset(ruleset); |