using getprpwent(3) with C2?

From: Simon Greaves <greaves_s_at_usp.ac.fj>
Date: Fri, 19 Jun 1998 13:54:39 +1200

I'm trying to use getprpw* to get C2 tcb structures. Compiles ok, but I
get:

        Authentication database use not initialized first

Hmm.. obviously missing something here, anyone enlighten me?

What I want to do is to write something that will just give me a report
of the last successful login for a given user. According to the manual
page, I should be able to use getprpwnam(username) to return a pointer
to a pr_passwd structure which has all the stuff I want.

Does anyone know if there is a perl module to do this sort of thing?

Sample program:

8<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#include <sys/types.h>
#include <sys/security.h>
#include <prot.h>

void
main(void)
{
  struct pr_passwd *prPasswd;
  
  /* try getting an entry by name.. */
  prPasswd = getprpwnam("greaves");
}

8<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Thanks,

Simon
-- 
Simon Greaves				voice: (+679) 212114
Computer Centre				fax:   (+679) 304089
The University of the South Pacific	email: greaves_s_at_usp.ac.fj
Suva, Fiji
Received on Fri Jun 19 1998 - 04:00:40 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT