(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:
Assar Westerlund
2000-06-03 12:58:28 +00:00
parent a1b0469cb7
commit 62cd158440

View File

@@ -313,8 +313,7 @@ main(int argc, char **argv)
long today;
sp = getspnam(su_info->pw_name);
if (sp==NULL)
errx(1,"Have not rights to read shadow passwords!");
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);