From: tholo Date: Fri, 3 May 1996 18:23:34 +0000 (+0000) Subject: Don't enable Kerberos password changing by default unless a local kerberos X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=694892157619cb53308e1477654e39e1bf8d3a31;p=openbsd Don't enable Kerberos password changing by default unless a local kerberos domain has been defined in the configuration file --- 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);