From: bluhm Date: Mon, 19 Jun 2017 18:35:05 +0000 (+0000) Subject: Terminate pledge log(9) with newline. This fixes dmesg(8) output. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0fb24ea81fa7049d7444eb25dd47f11a1cdaf209;p=openbsd Terminate pledge log(9) with newline. This fixes dmesg(8) output. found by regress/sys/kern/pledge/generic; OK deraadt@ --- diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 8e3c2cdb586..150b3f3a903 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.213 2017/06/12 21:55:16 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.214 2017/06/19 18:35:05 bluhm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -581,7 +581,7 @@ pledge_fail(struct proc *p, int error, uint64_t code) codes = pledgenames[i].name; break; } - log(LOG_ERR, "%s(%d): syscall %d \"%s\"", + log(LOG_ERR, "%s(%d): syscall %d \"%s\"\n", p->p_p->ps_comm, p->p_p->ps_pid, p->p_pledge_syscall, codes); p->p_p->ps_acflag |= APLEDGE; #ifdef KTRACE @@ -1065,7 +1065,7 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, void *new) char *p = buf + strlen(buf); snprintf(p, sizeof(buf) - (p - buf), " %d", mib[i]); } - log(LOG_ERR, "%s", buf); + log(LOG_ERR, "%s\n", buf); return pledge_fail(p, EINVAL, 0); }