summaryrefslogtreecommitdiffstats
path: root/eBones/lib/libkrb/get_in_tkt.c
diff options
context:
space:
mode:
Diffstat (limited to 'eBones/lib/libkrb/get_in_tkt.c')
-rw-r--r--eBones/lib/libkrb/get_in_tkt.c73
1 files changed, 22 insertions, 51 deletions
diff --git a/eBones/lib/libkrb/get_in_tkt.c b/eBones/lib/libkrb/get_in_tkt.c
index 00fc57a..79758f6 100644
--- a/eBones/lib/libkrb/get_in_tkt.c
+++ b/eBones/lib/libkrb/get_in_tkt.c
@@ -4,20 +4,22 @@
* <Copyright.MIT>.
*
* from: get_in_tkt.c,v 4.12 89/07/18 16:32:56 jtkohl Exp $
- * $Id: get_in_tkt.c,v 1.1.1.1 1994/09/30 14:50:00 csgr Exp $
+ * $Id: get_in_tkt.c,v 1.3 1995/07/18 16:38:30 mark Exp $
*/
+#if 0
#ifndef lint
static char rcsid[] =
-"$Id: get_in_tkt.c,v 1.1.1.1 1994/09/30 14:50:00 csgr Exp $";
+"$Id: get_in_tkt.c,v 1.3 1995/07/18 16:38:30 mark Exp $";
#endif /* lint */
+#endif
#include <krb.h>
#include <prot.h>
+#include <des.h>
+#include "conf.h"
-#ifndef NULL
-#define NULL 0
-#endif
+#include <stdio.h>
/*
* This file contains two routines: passwd_to_key() converts
@@ -42,18 +44,17 @@ static char rcsid[] =
*/
/*ARGSUSED */
-static int passwd_to_key(user,instance,realm,passwd,key)
- char *user, *instance, *realm, *passwd;
- C_Block key;
+static int passwd_to_key(char *user, char *instance, char *realm,
+ char *passwd, des_cblock key)
{
#ifdef NOENCRYPTION
if (!passwd)
placebo_read_password(key, "Password: ", 0);
#else
if (passwd)
- string_to_key(passwd,key);
+ string_to_key(passwd,(des_cblock *)key);
else
- des_read_password(key,"Password: ",0);
+ des_read_password((des_cblock *)key,"Password: ",0);
#endif
return (0);
}
@@ -75,10 +76,8 @@ static int passwd_to_key(user,instance,realm,passwd,key)
* The result of the call to krb_get_in_tkt() is returned.
*/
-krb_get_pw_in_tkt(user,instance,realm,service,sinstance,life,password)
- char *user, *instance, *realm, *service, *sinstance;
- int life;
- char *password;
+int krb_get_pw_in_tkt(char *user, char *instance, char *realm, char *service,
+ char *sinstance, int life, char *password)
{
return(krb_get_in_tkt(user,instance,realm,service,sinstance,life,
passwd_to_key, NULL, password));
@@ -86,8 +85,8 @@ krb_get_pw_in_tkt(user,instance,realm,service,sinstance,life,password)
#ifdef NOENCRYPTION
/*
- * $Source: /home/ncvs/src/eBones/krb/get_in_tkt.c,v $
- * $Author: csgr $
+ * $Source: /usr/cvs/src/eBones/krb/get_in_tkt.c,v $
+ * $Author: mark $
*
* Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
* of Technology.
@@ -100,41 +99,16 @@ krb_get_pw_in_tkt(user,instance,realm,service,sinstance,life,password)
* echoing.
*/
+#if 0
#ifndef lint
static char rcsid_read_password_c[] =
-"Bones$Header: /home/ncvs/src/eBones/krb/get_in_tkt.c,v 1.1.1.1 1994/09/30 14:50:00 csgr Exp $";
+"Bones$Header: /usr/cvs/src/eBones/krb/get_in_tkt.c,v 1.3 1995/07/18 16:38:30 mark Exp $";
#endif lint
-
-#include <des.h>
-#include "conf.h"
-
-#include <stdio.h>
-#ifdef BSDUNIX
-#include <strings.h>
-#include <sys/ioctl.h>
-#include <signal.h>
-#include <setjmp.h>
-#else
-char *strcpy();
-int strcmp();
#endif
-#ifdef BSDUNIX
-static jmp_buf env;
-#endif
-
-#ifdef BSDUNIX
-static void sig_restore();
-static push_signals(), pop_signals();
-int placebo_read_pw_string();
-#endif
/*** Routines ****************************************************** */
-int
-placebo_read_password(k,prompt,verify)
- des_cblock *k;
- char *prompt;
- int verify;
+int placebo_read_password(des_cblock *k, char *prompt, int verify)
{
int ok;
char key_string[BUFSIZ];
@@ -161,8 +135,7 @@ lose:
* Returns 0 on success, non-zero on failure.
*/
-int
-placebo_read_pw_string(s,max,prompt,verify)
+int placebo_read_pw_string(char *s, int max, char *prompt, int verify)
char *s;
int max;
char *prompt;
@@ -264,23 +237,21 @@ static void (*old_sigfunc[NSIG])();
static int (*old_sigfunc[NSIG])();
#endif POSIX
-static push_signals()
+static void push_signals()
{
register i;
for (i = 0; i < NSIG; i++)
old_sigfunc[i] = signal(i,sig_restore);
}
-static pop_signals()
+static void pop_signals()
{
register i;
for (i = 0; i < NSIG; i++)
signal(i,old_sigfunc[i]);
}
-static void sig_restore(sig,code,scp)
- int sig,code;
- struct sigcontext *scp;
+static void sig_restore(int sig, int code, struct sigcontext *scp)
{
longjmp(env,1);
}
OpenPOWER on IntegriCloud