#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
+
#include "defines.h"
#include "faillog.h"
#include "failure.h"
#include "memzero.h"
#include "prototypes.h"
+#include "string/strftime.h"
#include "string/strtcpy.h"
/*
* Print all information we have.
*/
- (void) strftime (lasttimeb, sizeof lasttimeb, "%c", tp);
+ STRFTIME(lasttimeb, "%c", tp);
/*@-formatconst@*/
(void) printf (ngettext ("%d failure since last login.\n"
#include "shadowio.h"
#include "shadowlog.h"
#include "string/sprintf.h"
+#include "string/strftime.h"
#include "string/strtcpy.h"
#include "time/day_to_str.h"
/*@-exitarg@*/
return;
}
- (void) strftime (buf, sizeof buf, iflg ? "%Y-%m-%d" : "%b %d, %Y", &tm);
+ STRFTIME(buf, iflg ? "%Y-%m-%d" : "%b %d, %Y", &tm);
(void) puts (buf);
}
#include <sys/types.h>
#include <time.h>
#include <assert.h>
+
#include "defines.h"
#include "faillog.h"
#include "memzero.h"
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
+#include "string/strftime.h"
+
/* local function prototypes */
NORETURN static void usage (int status);
fprintf (stderr, "Cannot read time from faillog.\n");
return;
}
- strftime (ptime, sizeof (ptime), "%D %H:%M:%S %z", tm);
+ STRFTIME(ptime, "%D %H:%M:%S %z", tm);
cp = ptime;
printf ("%-9s %5d %5d ",
#ifdef HAVE_LL_HOST
#include <net/if.h>
#endif
+
#include "defines.h"
#include "prototypes.h"
#include "getdef.h"
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
+#include "string/strftime.h"
+
/*
* Needed for MkLinux DR1/2/2.1 - J.
if (tm == NULL) {
cp = "(unknown)";
} else {
- strftime (ptime, sizeof (ptime), "%a %b %e %H:%M:%S %z %Y", tm);
+ STRFTIME(ptime, "%a %b %e %H:%M:%S %z %Y", tm);
cp = ptime;
}
if (ll.ll_time == (time_t) 0) {
#include "exitcodes.h"
#include "shadowlog.h"
#include "string/sprintf.h"
+#include "string/strftime.h"
#include "string/strtcpy.h"
+
#ifdef USE_PAM
#include "pam_defs.h"
#ifdef ENABLE_LASTLOG
if ( getdef_bool ("LASTLOG_ENAB")
&& pwd->pw_uid <= (uid_t) getdef_ulong ("LASTLOG_UID_MAX", 0xFFFFFFFFUL)
- && (ll.ll_time != 0)) {
+ && (ll.ll_time != 0))
+ {
time_t ll_time = ll.ll_time;
- (void) strftime (ptime, sizeof (ptime),
- "%a %b %e %H:%M:%S %z %Y",
- localtime (&ll_time));
+ STRFTIME(ptime, "%a %b %e %H:%M:%S %z %Y",
+ localtime(&ll_time));
printf (_("Last login: %s on %s"),
ptime, ll.ll_line);
#ifdef HAVE_LL_HOST /* __linux__ || SUN4 */