Re: shadow passwd reserved field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 02, 2000 at 09:12:18PM -0700, Andrew Morgan wrote:
> I don't know. Perhaps someone else can enlighten us?
> 
> [Do you use pam_pwdb or pam_unix?]
> 
> Cheers
> 
> Andrew
> 
> "Dublin Dale, Terror of the Sunol Grade" wrote:
> > 
> > Hi,
> > 
> > A short question for you hopefully.  In shadow passwd files there is a
> > reserved filed that PAM appears to use (but I don't know how since it
> > doesn't appear that sp_flag in the spwd struct is apparently never used).
> > For example an entry like:
> > 
> > wilma:xQBvJxB368gfg:11202:0:99999:7:-1:-1:134527444

This is from shadow.h:

    unsigned long int sp_flag;  /* Reserved.  */

And here is the code from putspent.c:

  if (p->sp_flag != ~0ul
      && fprintf (stream, "%ld", p->sp_flag) < 0)
    ++errors;

IMO, whatever code is using putspnam(), needs to set this field to ~0ul, so
it doesn't get written (note, I checked this in glibc 2.1.3 and 2.1.93, both
the same). Neither pam_unix now pam_pwdb calls putspnam(). I don't have
the pwdb sources, so I haven't checked that, but I'de be willing to bet it
has some similar internal call that it uses.

Of couse it would be nice if this were documented. I don't find a
reference to putspnam() in glibc's info pages.

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'





[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux