147
148
struct hashtab *login_table = NULL;
149
150
struct login_data
157
void log_everyone_in PARAMS((time_t));
158
void give_usage PARAMS((void));
159
void parse_entries PARAMS((void));
160
void update_system_time PARAMS((time_t));
161
void log_out PARAMS((struct utmp *entry, short fake_flag));
162
void log_in PARAMS((struct utmp *));
163
void print_record PARAMS((struct utmp *, time_t logout_time,
164
char *, char *, char *));
165
void display_date PARAMS((time_t now));
156
void log_everyone_in (time_t);
157
void update_system_time (time_t);
158
void log_out (struct utmp *entry, short fake_flag);
159
void log_in (struct utmp *);
160
void print_record (struct utmp *, time_t logout_time,
161
char *, char *, char *);
162
void display_date (time_t now);
167
164
#if defined (SVR4) && !defined (_POSIX_SOURCE)
168
RETSIGTYPE handler PARAMS((int, int, struct sigcontext *));
165
RETSIGTYPE handler (int, int, struct sigcontext *);
170
RETSIGTYPE handler PARAMS((int));
167
RETSIGTYPE handler (int);
216
213
int option_index = 0;
218
215
static struct option long_options[] =
220
{ "complain", no_argument, NULL, 1
222
{ "lines", required_argument, NULL, 3 },
223
{ "debug", no_argument, NULL, 4 },
224
{ "tw-leniency", required_argument, NULL, 5 },
225
{ "version", no_argument, NULL, 6 },
226
{ "help", no_argument, NULL, 7 },
227
{ "file", required_argument, NULL, 8 },
228
{ "no-truncate-ftp-entries", no_argument, NULL, 9 },
230
{ "all-records", no_argument, NULL, 10 },
233
{ "ip-address", no_argument, NULL, 11 },
235
{ "print-year", no_argument, NULL, 12 },
237
{ "more-records", no_argument, NULL, 13 },
239
{ "tw-suspicious", required_argument, NULL, 14 },
240
{ "print-seconds", no_argument, NULL, 15 },
241
{ "wide", no_argument, NULL, 16 },
217
{ "complain", no_argument, NULL, 1
219
{ "lines", required_argument, NULL, 3 },
220
{ "debug", no_argument, NULL, 4 },
221
{ "tw-leniency", required_argument, NULL, 5 },
222
{ "version", no_argument, NULL, 6 },
223
{ "help", no_argument, NULL, 7 },
224
{ "file", required_argument, NULL, 8 },
225
{ "no-truncate-ftp-entries", no_argument, NULL, 9 },
226
#ifdef HAVE_STRUCT_UTMP_UT_TYPE
227
{ "all-records", no_argument, NULL, 10 },
229
#ifdef HAVE_STRUCT_UTMP_UT_ADDR
230
{ "ip-address", no_argument, NULL, 11 },
232
{ "print-year", no_argument, NULL, 12 },
233
#ifdef HAVE_STRUCT_UTMP_UT_TYPE
234
{ "more-records", no_argument, NULL, 13 },
236
{ "tw-suspicious", required_argument, NULL, 14 },
237
{ "print-seconds", no_argument, NULL, 15 },
238
{ "wide", no_argument, NULL, 16 },
245
242
c = getopt_long (argc, argv,
243
#ifdef HAVE_STRUCT_UTMP_UT_TYPE
246
#ifdef HAVE_STRUCT_UTMP_UT_ADDR
250
#ifdef HAVE_STRUCT_UTMP_UT_TYPE