diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1996-01-01 11:01:15 +0000 | 
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1996-01-01 11:01:15 +0000 | 
| commit | 26ce5ad3876f0ea63ab67a8bdb2ed1a5a1591a3e (patch) | |
| tree | 69e72e626f1337094ba2f18cd7fded3ecaa930bf /eBones/lib/librkinit/rk_lib.c | |
| parent | a3ab491d642b34f2d3efbc0562abc8e79b38ce09 (diff) | |
Diffstat (limited to 'eBones/lib/librkinit/rk_lib.c')
| -rw-r--r-- | eBones/lib/librkinit/rk_lib.c | 100 | 
1 files changed, 0 insertions, 100 deletions
| diff --git a/eBones/lib/librkinit/rk_lib.c b/eBones/lib/librkinit/rk_lib.c deleted file mode 100644 index 06b8f392e0d6..000000000000 --- a/eBones/lib/librkinit/rk_lib.c +++ /dev/null @@ -1,100 +0,0 @@ -/*  - * $Id: rk_lib.c,v 1.1 1993/12/10 19:32:01 dglo Exp gibbs $ - * $Source: /usr/src/eBones/librkinit/RCS/rk_lib.c,v $ - * $Author: dglo $ - * - * This file contains the non-rpc top-level rkinit library routines. - * The routines in the rkinit library that should be called from clients - * are exactly those defined in this file. - * - * The naming convetions used within the rkinit library are as follows: - * Functions intended for general client use start with rkinit_ - * Functions intended for use only inside the library or server start with - * rki_ - * Functions that do network communcation start with rki_rpc_ - * Static functions can be named in any fashion. - */ - -#if !defined(lint) && !defined(SABER) && !defined(LOCORE) && defined(RCS_HDRS) -static char *rcsid = "$Id: rk_lib.c,v 1.1 1993/12/10 19:32:01 dglo Exp gibbs $"; -#endif /* lint || SABER || LOCORE || RCS_HDRS */ - -#include <stdio.h> -#include <unistd.h> -#include <string.h> -#include <setjmp.h> -#include <krb.h> - -#include <rkinit.h> -#include <rkinit_private.h> -#include <rkinit_err.h> - -#ifdef __STDC__ -char *rkinit_errmsg(char *string) -#else -char *rkinit_errmsg(string) -  char *string; -#endif /* __STDC__ */ -{ -    static char errmsg[BUFSIZ]; - -    if (string) { -	BCLEAR(errmsg); -	strncpy(errmsg, string, sizeof(errmsg) - 1); -    } - -    return(errmsg); -} - -#ifdef __STDC__ -int rkinit(char *host, char *r_krealm, rkinit_info *info, int timeout) -#else -int rkinit(host, r_krealm, info, timeout) -  char *host; -  char *r_krealm; -  rkinit_info *info; -  int timeout; -#endif /* __STDC__ */ -{ -    int status = RKINIT_SUCCESS; -    int version = 0; -    char phost[MAXHOSTNAMELEN]; -    jmp_buf timeout_env; -    void (*old_alrm)(int) = NULL; -    char origtktfilename[MAXPATHLEN]; /* original ticket file name */ -    char tktfilename[MAXPATHLEN]; /* temporary client ticket file */ - -    BCLEAR(phost); -    BCLEAR(origtktfilename); -    BCLEAR(tktfilename); -    BCLEAR(timeout_env); - -    init_rkin_err_tbl(); - -    if ((status = rki_setup_rpc(host))) -	return(status);	 - -    if (timeout) -	old_alrm = rki_setup_timer(timeout_env); -	 -    /* The alarm handler longjmps us to here. */ -    if ((status = setjmp(timeout_env)) == 0) { - -	strcpy(origtktfilename, tkt_string()); -	sprintf(tktfilename, "/tmp/tkt_rkinit.%ld", getpid()); -	krb_set_tkt_string(tktfilename); - -	if ((status = rki_choose_version(&version)) == RKINIT_SUCCESS) -	    status = rki_get_tickets(version, host, r_krealm, info); -    } -     -    if (timeout) -	rki_restore_timer(old_alrm); - -    dest_tkt(); -    krb_set_tkt_string(origtktfilename); - -    rki_cleanup_rpc(); - -    return(status); -} | 
