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

Re: PAM shadow support and NIS+



On Mon, Sep 20, Dmitry Panov wrote:

> Hello.
> 
> I've found out that getspnam() returns 0 when some shadow field is empty,
> while pam_sm_acct_mgmt() compares it to -1:
> 
> if ((curdays > spent->sp_expire) && (spent->sp_expire != -1)              
> 	        && (spent->sp_lstchg != 0)) {                                       
> 		        _log_err(LOG_NOTICE                                             
> 				,"account %s has expired (account expired)"            
> 				,uname);
> 					    
> So, I get this message for every user that have sp_expire field unset.
> 
> I'm not quite sure, maybe it's a glibc issue? Maybe it should return -1?

It is a glibc bug, it should return -1. But I don't know how you add
this empty field. All Solaris tools I know (nisaddent, (nis)passwd)
will write a -1 in such a field and don't let it empty.

  Thorsten

PS: Yes, I will fix this glibc bug.
-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/       kukuk@suse.de
SuSE GmbH            Schanzaeckerstr. 10            90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.



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