summaryrefslogtreecommitdiffstats
path: root/security/safesetid
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2019-04-10 12:54:34 -0400
committerMicah Morton <mortonm@chromium.org>2019-07-15 11:05:26 -0400
commitc783d525f9e7e1fd6a5dc3379f3c1fb041495b76 (patch)
treec5e14d107c87bea6f74215b18785577b10522c63 /security/safesetid
parentfec88ab0af9706b2201e5daf377c5031c62d11f7 (diff)
LSM: SafeSetID: fix pr_warn() to include newline
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>
Diffstat (limited to 'security/safesetid')
-rw-r--r--security/safesetid/lsm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/safesetid/lsm.c b/security/safesetid/lsm.c
index 06d4259f9ab1..ac55bf193213 100644
--- a/security/safesetid/lsm.c
+++ b/security/safesetid/lsm.c
@@ -91,7 +91,7 @@ static int safesetid_security_capable(const struct cred *cred,
91 * to functionality other than calling set*uid() (e.g. 91 * to functionality other than calling set*uid() (e.g.
92 * allowing user to set up userns uid mappings). 92 * allowing user to set up userns uid mappings).
93 */ 93 */
94 pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions", 94 pr_warn("Operation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*uid transitions\n",
95 __kuid_val(cred->uid)); 95 __kuid_val(cred->uid));
96 return -1; 96 return -1;
97 } 97 }
@@ -103,7 +103,7 @@ static int check_uid_transition(kuid_t parent, kuid_t child)
103{ 103{
104 if (check_setuid_policy_hashtable_key_value(parent, child)) 104 if (check_setuid_policy_hashtable_key_value(parent, child))
105 return 0; 105 return 0;
106 pr_warn("UID transition (%d -> %d) blocked", 106 pr_warn("UID transition (%d -> %d) blocked\n",
107 __kuid_val(parent), 107 __kuid_val(parent),
108 __kuid_val(child)); 108 __kuid_val(child));
109 /* 109 /*