(main): just ignore shadow information if getspnam returns NULL
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8310 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -312,9 +312,8 @@ main(int argc, char **argv)
|
||||
{ struct spwd *sp;
|
||||
long today;
|
||||
|
||||
sp=getspnam(su_info->pw_name);
|
||||
if (sp==NULL)
|
||||
errx(1,"Have not rights to read shadow passwords!");
|
||||
sp = getspnam(su_info->pw_name);
|
||||
if (sp != NULL) {
|
||||
today = time(0)/(24L * 60 * 60);
|
||||
if (sp->sp_expire > 0) {
|
||||
if (today >= sp->sp_expire) {
|
||||
@@ -339,6 +338,7 @@ main(int argc, char **argv)
|
||||
(int)(sp->sp_lstchg + sp->sp_max -today));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
{
|
||||
char *tty = ttyname (STDERR_FILENO);
|
||||
|
Reference in New Issue
Block a user