Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* protected password database
@ 1996-11-11  5:00 Richard Buchman
  1996-11-17  5:00 ` Graham Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Buchman @ 1996-11-11  5:00 UTC (permalink / raw)



i seem to be having a problem parsing the users protected database using
getprpwent on an alpha server 2100 running digital unix 3.2b


my includes are
#include <stdio.h>
#include <time.h>
#include <sys/types.h>
#include <sys/security.h>
#include <prot.h>

i set prot as a pointer using : struct pr_passwd *prot;

and do a : set_auth_parameters(1,argv);
next i : setprpwent;
         prot=getprpwent();

this is where the snag comes in.  i need to access the users uid yet 
when i try to access it using prot->fd_uid i get a 'fd_uid not a member of
struct' error. 

the man page for getprpwent says that the pointer returned is a pointer to 
a pr_passwd entry and lists fd_uid as a member of it.

what critical piece am i missing??

rich
---                                \|/    
                                   o o
+---------------------------.oooO--(_)--Oooo.---------------------------+
Richard Buchman
Assistant System Manager/Programmer
Queens College - City University of New York
Flushing, New York
(718) 997-5919
richb@qcunix1.acc.qc.edu
http://richb-pc.acc.qc.edu



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: protected password database
  1996-11-11  5:00 protected password database Richard Buchman
@ 1996-11-17  5:00 ` Graham Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Graham Jones @ 1996-11-17  5:00 UTC (permalink / raw)



Richard Buchman <richb@qcunix1.acc.qc.edu> wrote in article
<566e8e$gee@news.cuny.edu>...
> i seem to be having a problem parsing the users protected database using
> getprpwent on an alpha server 2100 running digital unix 3.2b
>....
>when i try to access it using prot->fd_uid i get a 'fd_uid not a member of
>struct' error. 
>....

Take a look at the man page again:
man getprpwent gives:
......
struct pr_passwd *getprpwent(void);
.... 
  struct pr_field  {
        /* Identity: */
        char    fd_name[AUTH_MAX_UNAME_SIZE]; /* uses 8 character \
                                              maximum (and \0) from utmp */
        uid_t   fd_uid;         /* uid associated with name above */
        char    fd_encrypt[AUTH_MAX_CIPHERTEXT_LENGTH]; /* Encrypted \
........

   struct pr_passwd  {
        struct pr_field ufld;   /* user specific fields */
        struct pr_flag uflg;    /* user specific flags */
        struct pr_field sfld;   /* system wide fields */
        struct pr_flag sflg;    /* system wide flags */
       };
....

So,
getprpwent returns struct pr_passwd *,
struct pr_passwd contains struct pr_field, 
struct pr_field contains the fd_uid you're after 

thus 'fd_uid is definitely not a member of struct'

instead of prot->fd_uid you want to say prot->ufld.fd_uid

Graham 
graham@liteyear.demon.co.uk 





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-11-17  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-11-11  5:00 protected password database Richard Buchman
1996-11-17  5:00 ` Graham Jones

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