Date: Thu, 5 Aug 2021 09:25:46 GMT From: Alex Richardson <arichardson@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 608cb9631239 - stable/13 - usr.bin/login: send errors to console if syslog isn't running Message-ID: <202108050925.1759Pkmv006580@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=608cb96312395a755f79e5108a54f69c53557428 commit 608cb96312395a755f79e5108a54f69c53557428 Author: Alex Richardson <arichardson@FreeBSD.org> AuthorDate: 2021-07-06 09:50:05 +0000 Commit: Alex Richardson <arichardson@FreeBSD.org> CommitDate: 2021-08-05 08:57:54 +0000 usr.bin/login: send errors to console if syslog isn't running I was debugging why login(1) wasn't working as expected on a minimal MFS_ROOT disk image. This image doesn't have syslogd running so the warnings were lost and I had to use GDB to find out why login(1) was failing (missing PAM libraries) instead of being able to see it in the console output. MFC after: 1 week Reviewed By: pfg Differential Revision: https://reviews.freebsd.org/D30892 (cherry picked from commit 4d552825ecebecd6c95a995c0b314b09936121b5) --- usr.bin/login/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 510712a15491..2ac0d9324c26 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -199,7 +199,7 @@ main(int argc, char *argv[]) (void)alarm(timeout); (void)setpriority(PRIO_PROCESS, 0, 0); - openlog("login", 0, LOG_AUTH); + openlog("login", LOG_CONS, LOG_AUTH); uid = getuid(); euid = geteuid();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108050925.1759Pkmv006580>