Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/login Don't syslog that krb5_init_context() failed i...
details: https://anonhg.NetBSD.org/src/rev/54bd87668a3d
branches: trunk
changeset: 495652:54bd87668a3d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Aug 02 16:51:17 2000 +0000
description:
Don't syslog that krb5_init_context() failed if it failed due
to Kerberos not being configured on the system.
diffstat:
usr.bin/login/login.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diffs (41 lines):
diff -r 465cfad3d508 -r 54bd87668a3d usr.bin/login/login.c
--- a/usr.bin/login/login.c Wed Aug 02 16:46:16 2000 +0000
+++ b/usr.bin/login/login.c Wed Aug 02 16:51:17 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: login.c,v 1.60 2000/08/02 05:58:36 thorpej Exp $ */
+/* $NetBSD: login.c,v 1.61 2000/08/02 16:51:17 thorpej Exp $ */
/*-
* Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
#endif
-__RCSID("$NetBSD: login.c,v 1.60 2000/08/02 05:58:36 thorpej Exp $");
+__RCSID("$NetBSD: login.c,v 1.61 2000/08/02 16:51:17 thorpej Exp $");
#endif /* not lint */
/*
@@ -298,8 +298,20 @@
#ifdef KERBEROS5
kerror = krb5_init_context(&kcontext);
if (kerror) {
- syslog(LOG_NOTICE, "%s when initializing Kerberos context",
- error_message(kerror));
+ /*
+ * If Kerberos is not configured, that is, we are
+ * not using Kerberos, do not log the error message.
+ * However, if Kerberos is configured, and the
+ * context init fails for some other reason, we need
+ * to issue a no tickets warning to the user when the
+ * login succeeds.
+ */
+ if (kerror != ENXIO) { /* XXX NetBSD-local Heimdal hack */
+ syslog(LOG_NOTICE,
+ "%s when initializing Kerberos context",
+ error_message(kerror));
+ krb5_configured = 1;
+ }
login_krb5_get_tickets = 0;
}
#endif KERBEROS5
Home |
Main Index |
Thread Index |
Old Index