(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:
@@ -313,8 +313,7 @@ main(int argc, char **argv)
|
|||||||
long today;
|
long today;
|
||||||
|
|
||||||
sp = getspnam(su_info->pw_name);
|
sp = getspnam(su_info->pw_name);
|
||||||
if (sp==NULL)
|
if (sp != NULL) {
|
||||||
errx(1,"Have not rights to read shadow passwords!");
|
|
||||||
today = time(0)/(24L * 60 * 60);
|
today = time(0)/(24L * 60 * 60);
|
||||||
if (sp->sp_expire > 0) {
|
if (sp->sp_expire > 0) {
|
||||||
if (today >= sp->sp_expire) {
|
if (today >= sp->sp_expire) {
|
||||||
@@ -339,6 +338,7 @@ main(int argc, char **argv)
|
|||||||
(int)(sp->sp_lstchg + sp->sp_max -today));
|
(int)(sp->sp_lstchg + sp->sp_max -today));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
char *tty = ttyname (STDERR_FILENO);
|
char *tty = ttyname (STDERR_FILENO);
|
||||||
|
Reference in New Issue
Block a user