]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
LSM: SafeSetID: fix pr_warn() to include newline
authorJann Horn <jannh@google.com>
Wed, 10 Apr 2019 16:54:34 +0000 (09:54 -0700)
committerMicah Morton <mortonm@chromium.org>
Mon, 15 Jul 2019 15:05:26 +0000 (08:05 -0700)
Fix the pr_warn() calls in the SafeSetID LSM to have newlines at the end.
Without this, denial messages will be buffered as incomplete lines in
log_output(), and will then only show up once something else prints into
dmesg.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Micah Morton <mortonm@chromium.org>
security/safesetid/lsm.c

index 06d4259f9ab1d5f2cbeaedd160ea56be8e8b7988..ac55bf193213617c6a1ed8d89e428f8a841a2108 100644 (file)
@@ -91,7 +91,7 @@ static int safesetid_security_capable(const struct cred *cred,
                         * to functionality other than calling set*uid() (e.g.
                         * allowing user to set up userns uid mappings).
                         */
-                       pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions",
+                       pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions\n",
                                __kuid_val(cred->uid));
                        return -1;
                }
@@ -103,7 +103,7 @@ static int check_uid_transition(kuid_t parent, kuid_t child)
 {
        if (check_setuid_policy_hashtable_key_value(parent, child))
                return 0;
-       pr_warn("UID transition (%d -> %d) blocked",
+       pr_warn("UID transition (%d -> %d) blocked\n",
                __kuid_val(parent),
                __kuid_val(child));
        /*