… | |
… | |
37 | * |
37 | * |
38 | * Private: |
38 | * Private: |
39 | * rxvt_update_wtmp (); |
39 | * rxvt_update_wtmp (); |
40 | *----------------------------------------------------------------------*/ |
40 | *----------------------------------------------------------------------*/ |
41 | |
41 | |
42 | #include "../config.h" /* NECESSARY */ |
42 | #include "../config.h" |
43 | #include "rxvt.h" /* NECESSARY */ |
43 | #include "rxvt.h" |
44 | #include "logging.h" |
44 | #include "logging.h" |
|
|
45 | |
45 | #ifdef UTMP_SUPPORT |
46 | #ifdef UTMP_SUPPORT |
46 | |
47 | |
47 | #if HAVE_STRUCT_UTMP |
48 | #if HAVE_STRUCT_UTMP |
48 | int rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu); |
49 | int rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu); |
49 | void rxvt_update_wtmp (const char *fname, const struct utmp *putmp); |
50 | void rxvt_update_wtmp (const char *fname, const struct utmp *putmp); |
… | |
… | |
202 | } |
203 | } |
203 | #endif |
204 | #endif |
204 | |
205 | |
205 | #ifdef WTMP_SUPPORT |
206 | #ifdef WTMP_SUPPORT |
206 | # ifdef WTMP_ONLY_ON_LOGIN |
207 | # ifdef WTMP_ONLY_ON_LOGIN |
207 | if (options & Opt_loginShell) |
208 | if (OPTION (Opt_loginShell)) |
208 | # endif |
209 | # endif |
209 | { |
210 | { |
210 | # ifdef HAVE_STRUCT_UTMP |
211 | # ifdef HAVE_STRUCT_UTMP |
211 | # ifdef HAVE_UPDWTMP |
212 | # ifdef HAVE_UPDWTMP |
212 | updwtmp (RXVT_WTMP_FILE, ut); |
213 | updwtmp (RXVT_WTMP_FILE, ut); |
… | |
… | |
222 | # endif |
223 | # endif |
223 | # endif |
224 | # endif |
224 | } |
225 | } |
225 | #endif |
226 | #endif |
226 | #if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE) |
227 | #if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE) |
227 | if (options & Opt_loginShell) |
228 | if (OPTION (Opt_loginShell)) |
228 | rxvt_update_lastlog (RXVT_LASTLOG_FILE, pty, hostname); |
229 | rxvt_update_lastlog (RXVT_LASTLOG_FILE, pty, hostname); |
229 | #endif |
230 | #endif |
230 | } |
231 | } |
231 | |
232 | |
232 | /* ------------------------------------------------------------------------- */ |
233 | /* ------------------------------------------------------------------------- */ |
… | |
… | |
283 | /* |
284 | /* |
284 | * Write ending wtmp entry |
285 | * Write ending wtmp entry |
285 | */ |
286 | */ |
286 | #ifdef WTMP_SUPPORT |
287 | #ifdef WTMP_SUPPORT |
287 | # ifdef WTMP_ONLY_ON_LOGIN |
288 | # ifdef WTMP_ONLY_ON_LOGIN |
288 | if (options & Opt_loginShell) |
289 | if (OPTION (Opt_loginShell)) |
289 | # endif |
290 | # endif |
290 | { |
291 | { |
291 | # ifdef HAVE_STRUCT_UTMP |
292 | # ifdef HAVE_STRUCT_UTMP |
292 | # ifdef HAVE_UPDWTMP |
293 | # ifdef HAVE_UPDWTMP |
293 | updwtmp (RXVT_WTMP_FILE, ut); |
294 | updwtmp (RXVT_WTMP_FILE, ut); |