Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: "Graham Jones" <graham@liteyear.demon.co.uk>
Subject: Re: protected password database
Date: 1996/11/17	[thread overview]
Message-ID: <01bbd484$8ff880e0$dd1fdec2@liteyear> (raw)
In-Reply-To: 566e8e$gee@news.cuny.edu


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 





      reply	other threads:[~1996-11-17  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-11  5:00 protected password database Richard Buchman
1996-11-17  5:00 ` Graham Jones [this message]
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