summaryrefslogtreecommitdiff
path: root/kerberosIV/kinit
diff options
context:
space:
mode:
authorHans Insulander <hin@cvs.openbsd.org>2000-02-25 15:15:11 +0000
committerHans Insulander <hin@cvs.openbsd.org>2000-02-25 15:15:11 +0000
commit85dd2d09f1fceff777e46c8a197ee6848658dfff (patch)
treee0fa1602a0cb31086c91e8a3bfdeffce58504b71 /kerberosIV/kinit
parentc64c2283aca15272a000c7aec3e50464c9f63a59 (diff)
Remove old KerberosIV code. (art@ ok)
Diffstat (limited to 'kerberosIV/kinit')
-rw-r--r--kerberosIV/kinit/Makefile9
-rw-r--r--kerberosIV/kinit/kinit.1155
-rw-r--r--kerberosIV/kinit/kinit.c173
3 files changed, 0 insertions, 337 deletions
diff --git a/kerberosIV/kinit/Makefile b/kerberosIV/kinit/Makefile
deleted file mode 100644
index a687f5af15c..00000000000
--- a/kerberosIV/kinit/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# from @(#)Makefile 8.1 (Berkeley) 6/1/93
-# $Id: Makefile,v 1.3 1998/03/12 14:00:01 art Exp $
-
-PROG= kinit
-DPADD= ${LIBKRB} ${LIBDES}
-LDADD= -lkrb -ldes
-BINDIR= /usr/bin
-
-.include <bsd.prog.mk>
diff --git a/kerberosIV/kinit/kinit.1 b/kerberosIV/kinit/kinit.1
deleted file mode 100644
index 91175eaf88c..00000000000
--- a/kerberosIV/kinit/kinit.1
+++ /dev/null
@@ -1,155 +0,0 @@
-.\"
-.\" This source code is no longer held under any constraint of USA
-.\" `cryptographic laws' since it was exported legally. The cryptographic
-.\" functions were removed from the code and a "Bones" distribution was
-.\" made. A Commodity Jurisdiction Request #012-94 was filed with the
-.\" USA State Department, who handed it to the Commerce department. The
-.\" code was determined to fall under General License GTDA under ECCN 5D96G,
-.\" and hence exportable. The cryptographic interfaces were re-added by Eric
-.\" Young, and then KTH proceeded to maintain the code in the free world.
-.\"
-.\"Copyright (C) 1989 by the Massachusetts Institute of Technology
-.\"
-.\"Export of this software from the United States of America is assumed
-.\"to require a specific license from the United States Government.
-.\"It is the responsibility of any person or organization contemplating
-.\"export to obtain such a license before exporting.
-.\"
-.\"WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
-.\"distribute this software and its documentation for any purpose and
-.\"without fee is hereby granted, provided that the above copyright
-.\"notice appear in all copies and that both that copyright notice and
-.\"this permission notice appear in supporting documentation, and that
-.\"the name of M.I.T. not be used in advertising or publicity pertaining
-.\"to distribution of the software without specific, written prior
-.\"permission. M.I.T. makes no representations about the suitability of
-.\"this software for any purpose. It is provided "as is" without express
-.\"or implied warranty.
-.\"
-.\" $OpenBSD: kinit.1,v 1.5 1998/08/03 07:43:18 deraadt Exp $
-.TH KINIT 1 "Kerberos Version 4.0" "MIT Project Athena"
-.SH NAME
-kinit \- Kerberos login utility
-.SH SYNOPSIS
-.B kinit
-[
-.B \-irvl
-]
-.SH DESCRIPTION
-The
-.I kinit
-command is used to login to the
-Kerberos
-authentication and authorization system.
-Note that only registered
-Kerberos
-users can use the
-Kerberos
-system.
-For information about registering as a
-Kerberos
-user,
-see the
-.I kerberos(1)
-manual page.
-.PP
-If you are logged in to a workstation that is running the
-.I toehold
-service,
-you do not have to use
-.I kinit.
-The
-.I toehold
-login procedure will log you into
-Kerberos
-automatically.
-You will need to use
-.I kinit
-only in those situations in which
-your original tickets have expired.
-(Tickets expire in about a day.)
-Note as well that
-.I toehold
-will automatically destroy your tickets when you logout from the workstation.
-.PP
-When you use
-.I kinit
-without options,
-the utility
-prompts for your username and Kerberos password,
-and tries to authenticate your login with the local
-Kerberos
-server.
-.PP
-If
-Kerberos
-authenticates the login attempt,
-.I kinit
-retrieves your initial ticket and puts it in the ticket file specified by
-your KRBTKFILE environment variable.
-If this variable is undefined,
-your ticket will be stored in the
-.IR /tmp
-directory,
-in the file
-.I tktuid ,
-where
-.I uid
-specifies your user identification number.
-.PP
-If you have logged in to
-Kerberos
-without the benefit of the workstation
-.I toehold
-system,
-make sure you use the
-.I kdestroy
-command to destroy any active tickets before you end your login session.
-You may want to put the
-.I kdestroy
-command in your
-.I \.logout
-file so that your tickets will be destroyed automatically when you logout.
-.PP
-The options to
-.I kinit
-are as follows:
-.TP 7
-.B \-i
-.I kinit
-prompts you for a
-Kerberos
-instance.
-.TP
-.B \-r
-.I kinit
-prompts you for a
-Kerberos
-realm.
-This option lets you authenticate yourself with a remote
-Kerberos
-server.
-.TP
-.B \-v
-Verbose mode.
-.I kinit
-prints the name of the ticket file used, and
-a status message indicating the success or failure of
-your login attempt.
-.TP
-.B \-l
-.I kinit
-prompts you for a ticket lifetime in minutes. Due to protocol
-restrictions in Kerberos Version 4, this value must be between 5 and
-1275 minutes.
-.SH SEE ALSO
-.PP
-kerberos(1), kdestroy(1), klist(1)
-.SH BUGS
-The
-.B \-r
-option has not been fully implemented.
-.SH AUTHORS
-Steve Miller, MIT Project Athena/Digital Equipment Corporation
-.br
-Clifford Neuman, MIT Project Athena
diff --git a/kerberosIV/kinit/kinit.c b/kerberosIV/kinit/kinit.c
deleted file mode 100644
index ad0b7e92a0d..00000000000
--- a/kerberosIV/kinit/kinit.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/* $OpenBSD: kinit.c,v 1.4 1998/07/13 20:08:55 art Exp $ */
-/* $Id: kinit.c,v 1.4 1998/07/13 20:08:55 art Exp $ */
-/* $KTH: kinit.c,v 1.15 1997/03/30 18:58:46 assar Exp $ */
-
-
-
-/*-
- * Copyright 1987, 1988 by the Student Information Processing Board
- * of the Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software
- * and its documentation for any purpose and without fee is
- * hereby granted, provided that the above copyright notice
- * appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation,
- * and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
- * used in advertising or publicity pertaining to distribution
- * of the software without specific, written prior permission.
- * M.I.T. and the M.I.T. S.I.P.B. make no representations about
- * the suitability of this software for any purpose. It is
- * provided "as is" without express or implied warranty.
- */
-
-/*
- * Routine to initialize user to Kerberos. Prompts optionally for
- * user, instance and realm. Authenticates user and gets a ticket
- * for the Kerberos ticket-granting service for future use.
- *
- * Options are:
- *
- * -i[instance]
- * -r[realm]
- * -v[erbose]
- * -l[ifetime]
- * -p
- */
-
-#include <kuser_locl.h>
-#include <sys/param.h>
-
-#define LIFE DEFAULT_TKT_LIFE /* lifetime of ticket in 5-minute units */
-#define CHPASSLIFE 2
-
-char progname[] = "kinit";
-
-static void
-get_input(char *s, int size, FILE *stream)
-{
- char *p;
-
- if (fgets(s, size, stream) == NULL)
- exit(1);
- if ( (p = strchr(s, '\n')) != NULL)
- *p = '\0';
-}
-
-static void
-usage(void)
-{
- fprintf(stderr, "Usage: %s [-irvlp] [name]\n", progname);
- exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
- char aname[ANAME_SZ];
- char inst[INST_SZ];
- char realm[REALM_SZ];
- char buf[MAXHOSTNAMELEN];
- char name[MAX_K_NAME_SZ];
- char *username = NULL;
- int iflag, rflag, vflag, lflag, pflag, lifetime, k_errno;
- int i;
-
- *inst = *realm = '\0';
- iflag = rflag = vflag = lflag = pflag = 0;
- lifetime = LIFE;
-
- while (--argc) {
- if ((*++argv)[0] != '-') {
- if (username)
- usage();
- username = *argv;
- continue;
- }
- for (i = 1; (*argv)[i] != '\0'; i++)
- switch ((*argv)[i]) {
- case 'i': /* Instance */
- ++iflag;
- continue;
- case 'r': /* Realm */
- ++rflag;
- continue;
- case 'v': /* Verbose */
- ++vflag;
- continue;
- case 'l':
- ++lflag;
- continue;
- case 'p':
- ++pflag; /* chpass-tickets */
- lifetime = CHPASSLIFE;
- break;
- default:
- usage();
- }
- }
- if (username &&
- (k_errno = kname_parse(aname, inst, realm, username)) != KSUCCESS) {
- warnx("%s", krb_get_err_text(k_errno));
- iflag = rflag = 1;
- username = NULL;
- }
- if (gethostname(buf, sizeof(buf)))
- errx(1, "gethostname failed");
- printf("%s (%s)\n", ORGANIZATION, buf);
- if (username) {
- printf("Kerberos Initialization for \"%s", aname);
- if (*inst)
- printf(".%s", inst);
- if (*realm)
- printf("@%s", realm);
- printf("\"\n");
- } else {
- printf("Kerberos Initialization\n");
- printf("Kerberos name: ");
- get_input(name, sizeof(name), stdin);
- if (!*name)
- return 0;
- if ((k_errno = kname_parse(aname, inst, realm, name)) != KSUCCESS )
- errx(1, "%s", krb_get_err_text(k_errno));
- }
- /* optional instance */
- if (iflag) {
- printf("Kerberos instance: ");
- get_input(inst, sizeof(inst), stdin);
- if (!k_isinst(inst))
- errx(1, "bad Kerberos instance format");
- }
- if (rflag) {
- printf("Kerberos realm: ");
- get_input(realm, sizeof(realm), stdin);
- if (!k_isrealm(realm))
- errx(1, "bad Kerberos realm format");
- }
- if (lflag) {
- printf("Kerberos ticket lifetime (minutes): ");
- get_input(buf, sizeof(buf), stdin);
- lifetime = atoi(buf);
- if (lifetime < 5)
- lifetime = 1;
- else
- lifetime = krb_time_to_life(0, lifetime*60);
- /* This should be changed if the maximum ticket lifetime */
- /* changes */
- if (lifetime > 255)
- lifetime = 255;
- }
- if (!*realm && krb_get_lrealm(realm, 1))
- errx(1, "krb_get_lrealm failed");
- k_errno = krb_get_pw_in_tkt(aname, inst, realm,
- pflag ? PWSERV_NAME :
- KRB_TICKET_GRANTING_TICKET,
- pflag ? KADM_SINST : realm,
- lifetime, 0);
- if (vflag) {
- printf("Kerberos realm %s:\n", realm);
- printf("%s\n", krb_get_err_text(k_errno));
- } else if (k_errno)
- errx(1, "%s", krb_get_err_text(k_errno));
- exit(0);
-}