(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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user