From: jasper Hoon <jasperhoon () webmail ! co ! za>
To: tru64-unix-managers
Subject: Summary: Memory fault (Coredump) with pswd validation program
Date: Wed, 30 May 2001 06:44:01 +0000 [thread overview]
Message-ID: <102653647622179.tru64-unix-managers.marc@archive.invalid> (raw)
The problem was indeed with the incorrect passing of arguments.
Many thanks to the following people who sent information as well as
replacement code!
Stanislav S. Anokhin <stas@peterstar.com>
Dr. Thomas.Blinn@Compaq.com <tpb@doctor.zk3.dec.com>
<LHERCAUD@bouyguestelecom.fr>
James Sainsbury <sainsb_j@chem.usyd.edu.au>
Jeff Sullivan <jps@zk3.dec.com>
Ann Majeske <Ann.Majeske@compaq.com>
Roetman, Paul <PRoetman@CSXLines.com>
The correct way is shown here:
===========
#include <stdio.h>
#include <stdlib.h>
#include <prot.h>
#include <sia.h>
#include <siad.h>
main (int argc, char *argv[])
{
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,argv[1],
NULL,0,NULL , argv[2]);
if( auth_status != SIASUCCESS){
printf("wrong password \n");
return(1);
}
printf("right password \n");
return 0;
}
==============
________________________________________________________________
Mid-year intake! Enrol NOW & stand a chance to win 25% discount
http://www.milpark.co.za
reply other threads:[~2001-05-30 6:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox