1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

Use KJH's auth.conf parser to turn on/off Kerberos in userland.

This commit is contained in:
Mark Murray 1998-10-09 06:38:33 +00:00
parent bacda65d14
commit 8f176b4353
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40102
4 changed files with 22 additions and 5 deletions

View File

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)login.1 8.2 (Berkeley) 5/5/94
.\" $Id: login.1,v 1.9 1997/07/22 07:39:42 charnier Exp $
.\" $Id: login.1,v 1.10 1998/01/07 10:42:57 obrien Exp $
.\"
.Dd May 5, 1994
.Dt LOGIN 1
@ -176,6 +176,8 @@ login account records
system mailboxes
.It Pa \&.hushlogin
makes login quieter
.It Pa /etc/auth.conf
configure authentication services
.El
.Sh SEE ALSO
.Xr chpass 1 ,

View File

@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
"$Id: login.c,v 1.37 1998/07/31 07:22:31 bde Exp $";
"$Id: login.c,v 1.38 1998/08/17 03:25:07 jkoshy Exp $";
#endif /* not lint */
/*
@ -63,6 +63,7 @@ static const char rcsid[] =
#include <err.h>
#include <errno.h>
#include <grp.h>
#include <libutil.h>
#include <netdb.h>
#include <pwd.h>
#include <setjmp.h>
@ -175,6 +176,9 @@ main(argc, argv)
#ifdef SKEY
int permit_passwd = 0;
#endif /* SKEY */
#ifdef KERBEROS
char *k;
#endif
(void)signal(SIGALRM, timedout);
(void)alarm(timeout);
@ -472,7 +476,10 @@ main(argc, argv)
rval = 1; /* failed */
} else
#endif /* SKEY */
rval = klogin(pwd, instance, localhost, p);
rval = 1;
k = auth_getval("auth_list");
if (k && strstr(k, "kerberos"))
rval = klogin(pwd, instance, localhost, p);
if (rval != 0 && rootlogin && pwd->pw_uid != 0)
rootlogin = 0;
if (rval == 0)

View File

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)passwd.1 8.1 (Berkeley) 6/6/93
.\" $Id: passwd.1,v 1.8 1998/01/03 19:14:02 steve Exp $
.\" $Id: passwd.1,v 1.9 1998/08/24 00:56:20 steve Exp $
.\"
.Dd June 6, 1993
.Dt PASSWD 1
@ -183,6 +183,8 @@ A Version 7 format password file
Temporary copy of the password file
.It Pa /etc/login.conf
Login class capabilities database
.It Pa /etc/auth.conf
configure authentication services
.El
.Sh SEE ALSO
.Xr chpass 1 ,

View File

@ -42,11 +42,14 @@ static const char copyright[] =
static char sccsid[] = "@(#)passwd.c 8.3 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
"$Id: passwd.c,v 1.13 1997/07/31 06:57:47 charnier Exp $";
"$Id: passwd.c,v 1.14 1998/03/23 14:14:24 bde Exp $";
#endif /* not lint */
#include <sys/types.h>
#include <err.h>
#include <errno.h>
#include <libutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -80,6 +83,7 @@ main(argc, argv)
char *uname;
#ifdef KERBEROS
char *iflag = 0, *rflag = 0, *uflag = 0;
char *k;
#endif
#ifdef YP
@ -209,6 +213,8 @@ main(argc, argv)
if (!use_local_passwd) {
#ifdef KERBEROS
k = auth_getval("auth_list");
if (k && strstr(k, "kerberos"))
if(krb_get_lrealm(realm, 0) == KSUCCESS) {
fprintf(stderr, "realm %s\n", realm);
exit(krb_passwd(argv[0], iflag, rflag, uflag));