From 694892157619cb53308e1477654e39e1bf8d3a31 Mon Sep 17 00:00:00 2001 From: tholo Date: Fri, 3 May 1996 18:23:34 +0000 Subject: [PATCH] Don't enable Kerberos password changing by default unless a local kerberos domain has been defined in the configuration file --- usr.bin/passwd/passwd.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c index 042fa3a8d9b..7494ec1e785 100644 --- a/usr.bin/passwd/passwd.c +++ b/usr.bin/passwd/passwd.c @@ -39,12 +39,15 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)passwd.c 5.5 (Berkeley) 7/6/91";*/ -static char rcsid[] = "$Id: passwd.c,v 1.2 1996/01/16 07:22:15 deraadt Exp $"; +static char rcsid[] = "$Id: passwd.c,v 1.3 1996/05/03 18:23:34 tholo Exp $"; #endif /* not lint */ #include #include #include +#ifdef KERBEROS +#include +#endif /* * Note on configuration: @@ -69,9 +72,11 @@ main(argc, argv) char *username; int status = 0; char *basename; - #if defined(KERBEROS) || defined(KERBEROS5) - use_kerberos = 1; + extern char realm[]; + + if (krb_get_lrealm(realm,1) == KSUCCESS) + use_kerberos = 1; #endif #ifdef YP use_yp = _yp_check(NULL); -- 2.20.1