(doit): check return value of getspnam. From <haba@pdc.kth.se>

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8309 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-06-03 12:56:44 +00:00
parent 9961b240b7
commit a1b0469cb7

View File

@@ -664,10 +664,12 @@ doit (int do_kerberos, int check_rhosts)
long today;
sp = getspnam(server_user);
today = time(0)/(24L * 60 * 60);
if (sp->sp_expire > 0)
if (today > sp->sp_expire)
fatal(s, "Account has expired.");
if (sp != NULL) {
today = time(0)/(24L * 60 * 60);
if (sp->sp_expire > 0)
if (today > sp->sp_expire)
fatal(s, "Account has expired.");
}
}
#endif