From fd697cc0e91717955e7f0ccf5deeaa1bb3e94d96 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 7 Jun 2021 15:37:38 +0200 Subject: [PATCH] lsm/apparmor: actually report an error when we fail to wire AppArmor profile Link: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1931064 Signed-off-by: Christian Brauner --- src/lxc/lsm/apparmor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lsm/apparmor.c b/src/lxc/lsm/apparmor.c index 73429ed33..3e4aa40d7 100644 --- a/src/lxc/lsm/apparmor.c +++ b/src/lxc/lsm/apparmor.c @@ -1184,7 +1184,7 @@ static int apparmor_process_label_set_at(struct lsm_ops *ops, int label_fd, cons ret = lxc_write_nointr(label_fd, command, len - 1); INFO("Set AppArmor label to \"%s\"", label); - return 0; + return ret; } /* -- 2.47.2