static char dqs_klogvalidation_rcsid[]="$Id: dqs_klogvalidation.c,v 1.1.1.1 1997/04/10 15:10:32 green Exp $";

/*----------------------------------------------------
 * dqs_c_qmaster.c Tom Green Mon Jan 31 10:42:38 1994
 *
 * Copyright 1993
 *
 * SUPER COMPUTER COMPUTATIONS RESEARCH INSTITUTE
 *            FLORIDA STATE UNIVERSITY
 *
 *
 * SCRI representatives make no claims about the
 * suitability of this software for any purpose.
 * It is provided "as is" without express or
 * implied warranty.


klogvalidation.c


#include "h.h"
#include "def.h"
#include "dqs.h"
#include "struct.h"
#include "func.h"
#include "globals.h"
#include "dqs_errno.h"

klogvalid(username,password)
  char *username;
  char *password;
{
        long code=1;
        string klog_command;
        DENTER((DQS_EVENT,"klogvalid"));
        sprintf(klog_command,"%s -principal %s -password %s -lifetime 0:05",conf.klog,username,password);
        if (lsetpag() == -1) {
                printf("lsetpag\n");
        }
        else
        {
                code = system(klog_command);
                if (code) {
                        ERROR(("Unable to authenticate to AFS because !\n"));
                }
        }
        return(code);
}

