tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary: Memory fault (Coredump) with pswd validation program
@ 2001-05-30  6:44 jasper Hoon
  0 siblings, 0 replies; only message in thread
From: jasper Hoon @ 2001-05-30  6:44 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-30  6:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-30  6:44 Summary: Memory fault (Coredump) with pswd validation program jasper Hoon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox