Re: shadow passwd reserved field

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

 



> > > 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

$ dc
16o
134527444p
804B9D4

This looks like a pointer on ELF/x86.

> This is from shadow.h:
> 
>     unsigned long int sp_flag;  /* Reserved.  */

There was a bug in libpwdb which caused this field to not be set when
replacing an entry.

diff -ur pwdb-0.61.orig/libpwdb/pwdb/interface/shadow/user.c pwdb-0.61/libpwdb/pwdb/interface/shadow/user.c
--- pwdb-0.61.orig/libpwdb/pwdb/interface/shadow/user.c	Wed Oct  7 00:58:43 1998
+++ pwdb-0.61/libpwdb/pwdb/interface/shadow/user.c	Sun Sep  3 18:56:58 2000
@@ -349,6 +349,9 @@
         /* not available in pwdb_entry */
         spwent.sp_expire=spw->sp_expire;
 
+    /* RESERVED */
+	spwent.sp_flag = -1;
+
     if (!__pwdb_spw_close()) {
         pwdb_entry_user = _pwdb_delete_string(pwdb_entry_user);
         spwent.sp_pwdp = _pwdb_delete_string(spwent.sp_pwdp);

Signed,
Solar Designer





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

  Powered by Linux