Hi all,
When I run the following password validation program, I get a Memory
fault (Coredump). It compiles cleanly.
We use C2 on Tru64 V4.0f
Any idea why...please.??
===============
program: chpa.c
===============
#include <stdio.h>
#include <stdlib.h>
#include <prot.h>
#include <sia.h>
#include <siad.h>
main (user, pass)
char *user;
char *pass;
{
int auth_status;
int myargc;
char *myargv[2];
myargc = 1;
myargv[0] = "chkpass";
myargv[1] = NULL;
auth_status=sia_validate_user(NULL,myargc,myargv,NULL,user,NULL,0,NULL
,
pass);
if( auth_status != SIASUCCESS){
printf("wrong password \n");
return(1);
}
printf("right password \n");
return 0;
}
/* compile with: cc chpa.c -lsecurity -o chpa
=====================
Many thanks!!
________________________________________________________________
Mid-year intake! Enrol NOW & stand a chance to win 25% discount
http://www.milpark.co.za
Received on Tue May 29 2001 - 11:22:27 NZST