Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/login no more KRB5_DEPRECATED
details: https://anonhg.NetBSD.org/src/rev/7a96c54f7b21
branches: trunk
changeset: 778992:7a96c54f7b21
user: christos <christos%NetBSD.org@localhost>
date: Tue Apr 24 16:52:26 2012 +0000
description:
no more KRB5_DEPRECATED
diffstat:
usr.bin/login/Makefile | 4 +---
usr.bin/login/k5login.c | 49 ++-----------------------------------------------
2 files changed, 3 insertions(+), 50 deletions(-)
diffs (95 lines):
diff -r 585bfce9716e -r 7a96c54f7b21 usr.bin/login/Makefile
--- a/usr.bin/login/Makefile Tue Apr 24 16:51:19 2012 +0000
+++ b/usr.bin/login/Makefile Tue Apr 24 16:52:26 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2012/04/23 20:54:40 christos Exp $
+# $NetBSD: Makefile,v 1.55 2012/04/24 16:52:26 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 7/19/93
WARNS?= 5
@@ -25,8 +25,6 @@
.if (${USE_KERBEROS} != "no")
SRCS+= k5login.c
CPPFLAGS+=-DKERBEROS5
-# XXX: for krb5_get_in_tkt_with_password
-CPPFLAGS+=-DKRB5_DEPRECATED=
DPADD+= ${LIBKRB5} ${LIBASN1}
LDADD+= -lkrb5 -lasn1
diff -r 585bfce9716e -r 7a96c54f7b21 usr.bin/login/k5login.c
--- a/usr.bin/login/k5login.c Tue Apr 24 16:51:19 2012 +0000
+++ b/usr.bin/login/k5login.c Tue Apr 24 16:52:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: k5login.c,v 1.32 2012/04/24 16:51:19 christos Exp $ */
+/* $NetBSD: k5login.c,v 1.33 2012/04/24 16:52:26 christos Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -51,7 +51,7 @@
#if 0
static char sccsid[] = "@(#)klogin.c 5.11 (Berkeley) 7/12/92";
#endif
-__RCSID("$NetBSD: k5login.c,v 1.32 2012/04/24 16:51:19 christos Exp $");
+__RCSID("$NetBSD: k5login.c,v 1.33 2012/04/24 16:52:26 christos Exp $");
#endif /* not lint */
#ifdef KERBEROS5
@@ -400,50 +400,6 @@
}
memset(&my_creds, 0, sizeof(my_creds));
-#if 0
- krb5_principal server;
- krb5_timestamp now;
- long lifetime = KRB5_DEFAULT_LIFE;
-
- my_creds.client = me;
-
- const char *xrealm = krb5_principal_get_realm(kcontext, me);
- size_t rlen = strlen(xrealm);
- if ((kerror = krb5_build_principal_ext(kcontext,
- &server,
- rlen, xrealm,
- KRB5_TGS_NAME_SIZE,
- KRB5_TGS_NAME,
- rlen, xrealm,
- 0)) != 0) {
- k5_log(kcontext, kerror, "while building server name");
- return (1);
- }
-
- my_creds.server = server;
-
- if ((kerror = krb5_timeofday(kcontext, &now)) != 0) {
- k5_log(kcontext, kerror, "while getting time of day");
- return (1);
- }
-
- my_creds.times.starttime = 0; /* start timer when request
- gets to KDC */
- my_creds.times.endtime = now + lifetime;
- my_creds.times.renew_till = 0;
-
- int options = KRB5_DEFAULT_OPTIONS;
-
- if (login_krb5_forwardable_tgt)
- options |= KDC_OPT_FORWARDABLE;
-
- kerror = krb5_get_in_tkt_with_password(kcontext, options,
- NULL, NULL, NULL, password, ccache, &my_creds, 0);
-
- if (my_creds.server != NULL)
- krb5_free_principal(kcontext, my_creds.server);
-#else
- /* This does not work yet */
krb5_get_init_creds_opt *opt;
if ((kerror = krb5_get_init_creds_opt_alloc(kcontext, &opt)) != 0) {
@@ -459,7 +415,6 @@
krb5_get_init_creds_opt_free(kcontext, opt);
if (kerror == 0)
kerror = krb5_cc_store_cred(kcontext, ccache, &my_creds);
-#endif
if (chown(&tkt_location[5], pw->pw_uid, pw->pw_gid) < 0)
syslog(LOG_ERR, "chown tkfile (%s): %m", &tkt_location[5]);
Home |
Main Index |
Thread Index |
Old Index