time_t are the same size as an argument to localtime.
* heuristic.c (get_authorized_princ_names): If .k5login file
exists but is not owned by the user, do not attempt to fclose an
uninitialized FILE *.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14556
dc483132-0cff-0310-8789-
dd5450dbe970
+2002-06-21 Ezra Peisach <epeisach@bu.edu>
+
+ * ccache.c (printtime): Do not assume that krb5_timestamp and
+ time_t are the same size as an argument to localtime.
+
+ * heuristic.c (get_authorized_princ_names): If .k5login file
+ exists but is not owned by the user, do not attempt to fclose an
+ uninitialized FILE *.
+
2001-10-30 Ezra Peisach <epeisach@mit.edu>
* main.c (main): Do not pass LOG_AUTH facility into openlog() as a
void printtime(tv)
time_t tv;
{
- struct tm *kstime;
char fmtbuf[18];
char fill;
+ krb5_timestamp tstamp;
- kstime = localtime((time_t *)&tv);
+ /* XXXX ASSUMES sizeof(krb5_timestamp) >= sizeof(time_t) */
+ (void) localtime((time_t *)&tv);
+ tstamp = tv;
fill = ' ';
- if (!krb5_timestamp_to_sfstring((krb5_timestamp) tv,
+ if (!krb5_timestamp_to_sfstring(tstamp,
fmtbuf,
sizeof(fmtbuf),
&fill))
if ((login_fp = fopen(k5login_path, "r")) == NULL)
return 0;
if ( fowner(login_fp, pwd->pw_uid) == FALSE){
- close_time(k5users_flag,users_fp, k5login_flag,login_fp);
+ close_time(1 /*k5users_flag*/, (FILE *) 0 /*users_fp*/,
+ k5login_flag,login_fp);
return 0;
}
}