Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/login make this compile....
details: https://anonhg.NetBSD.org/src/rev/3ea317ce3f70
branches: trunk
changeset: 475791:3ea317ce3f70
user: christos <christos%NetBSD.org@localhost>
date: Wed Aug 25 19:58:15 1999 +0000
description:
make this compile....
diffstat:
usr.bin/login/k5login.c | 27 +++++++++++++++------------
usr.bin/login/login.c | 7 ++++---
2 files changed, 19 insertions(+), 15 deletions(-)
diffs (134 lines):
diff -r 935e812644d5 -r 3ea317ce3f70 usr.bin/login/k5login.c
--- a/usr.bin/login/k5login.c Wed Aug 25 19:25:13 1999 +0000
+++ b/usr.bin/login/k5login.c Wed Aug 25 19:58:15 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: k5login.c,v 1.7 1999/07/12 21:36:10 aidan Exp $ */
+/* $NetBSD: k5login.c,v 1.8 1999/08/25 19:58:15 christos Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,13 +38,14 @@
#if 0
static char sccsid[] = "@(#)klogin.c 5.11 (Berkeley) 7/12/92";
#endif
-__RCSID("$NetBSD: k5login.c,v 1.7 1999/07/12 21:36:10 aidan Exp $");
+__RCSID("$NetBSD: k5login.c,v 1.8 1999/08/25 19:58:15 christos Exp $");
#endif /* not lint */
#ifdef KERBEROS5
#include <sys/param.h>
#include <sys/syslog.h>
-#include <krb5.h>
+#include <krb5/krb5.h>
+#include <kerberosIV/com_err.h>
#include <pwd.h>
#include <netdb.h>
#include <stdio.h>
@@ -72,6 +73,11 @@
int have_forward;
static krb5_principal me, server;
+int k5_read_creds __P((char *));
+int k5_write_creds __P((void));
+int klogin __P((struct passwd *, char *, char *, char *));
+void kdestroy __P((void));
+
/*
* Attempt to read forwarded kerberos creds
*
@@ -137,7 +143,6 @@
{
krb5_error_code code;
krb5_ccache ccache;
- char buf[256];
if (!have_forward)
return(1);
@@ -180,10 +185,8 @@
krb5_creds my_creds;
krb5_timestamp now;
krb5_ccache ccache = NULL;
- int preauth_type = -1;
long lifetime = KRB5_DEFAULT_LIFE;
int options = KRB5_DEFAULT_OPTIONS;
- int i;
char *realm, *client_name;
char *principal;
@@ -220,19 +223,19 @@
strcat(principal, instance); /* XXX strcat is safe */
}
- if (kerror = krb5_cc_resolve(kcontext, tkt_location, &ccache)) {
+ if ((kerror = krb5_cc_resolve(kcontext, tkt_location, &ccache)) != 0) {
syslog(LOG_NOTICE, "warning: %s while getting default ccache",
error_message(kerror));
return(1);
}
- if (kerror = krb5_parse_name(kcontext, principal, &me)) {
+ if ((kerror = krb5_parse_name(kcontext, principal, &me)) != 0) {
syslog(LOG_NOTICE, "warning: %s when parsing name %s",
error_message(kerror), principal);
return(1);
}
- if (kerror = krb5_unparse_name(kcontext, me, &client_name)) {
+ if ((kerror = krb5_unparse_name(kcontext, me, &client_name)) != 0) {
syslog(LOG_NOTICE, "warning: %s when unparsing name %s",
error_message(kerror), principal);
return(1);
@@ -249,14 +252,14 @@
my_creds.client = me;
- if (kerror = krb5_build_principal_ext(kcontext,
+ if ((kerror = krb5_build_principal_ext(kcontext,
&server,
krb5_princ_realm(kcontext, me)->length,
krb5_princ_realm(kcontext, me)->data,
tgtname.length, tgtname.data,
krb5_princ_realm(kcontext, me)->length,
krb5_princ_realm(kcontext, me)->data,
- 0)) {
+ 0)) != 0) {
syslog(LOG_NOTICE, "%s while building server name",
error_message(kerror));
return(1);
@@ -271,7 +274,7 @@
return(1);
}
- if (kerror = krb5_timeofday(kcontext, &now)) {
+ if ((kerror = krb5_timeofday(kcontext, &now)) != 0) {
syslog(LOG_NOTICE, "%s while getting time of day",
error_message(kerror));
return(1);
diff -r 935e812644d5 -r 3ea317ce3f70 usr.bin/login/login.c
--- a/usr.bin/login/login.c Wed Aug 25 19:25:13 1999 +0000
+++ b/usr.bin/login/login.c Wed Aug 25 19:58:15 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: login.c,v 1.44 1999/07/12 21:36:11 aidan Exp $ */
+/* $NetBSD: login.c,v 1.45 1999/08/25 19:58:15 christos 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.44 1999/07/12 21:36:11 aidan Exp $");
+__RCSID("$NetBSD: login.c,v 1.45 1999/08/25 19:58:15 christos Exp $");
#endif /* not lint */
/*
@@ -80,7 +80,8 @@
#include <skey.h>
#endif
#ifdef KERBEROS5
-#include <krb5.h>
+#include <krb5/krb5.h>
+#include <kerberosIV/com_err.h>
#endif
#include "pathnames.h"
Home |
Main Index |
Thread Index |
Old Index