/* example1.c */
/********************************************************/
/* ©1990 - 2000 RSA Security Inc.  All Rights Reserved. */
/********************************************************/
/* example1.c  uses sd_auth, which handles prompting*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sdi_athd.h"
#include "sdconf.h"

union config_record configure;
main()
{
struct SD_CLIENT sd_dat, *sd;
int i;
char input[64],*p;

memset(&sd_dat, 0, sizeof(sd_dat));   /* clear struct for sd_auth */
sd = &sd_dat;
if (creadcfg())              /* access sdconf.rec */
{
   printf ("Error reading sdconf.rec. \n");
   exit(1);
}
if (sd_init(sd))
    {
    printf("Cannot initialize client-server communications.  \n");
    exit(1);
    }
if (!sd_auth(sd))
     printf("Login ID: %s, Shell: %s\n", sd->username, sd->shell);

}



