diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-11-04 16:31:31 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-11-04 16:31:31 -0800 |
commit | e9d23df81ae6e5beb79237cb13b555ed689b1a76 (patch) | |
tree | 51b59a9d0f63e4e9748ff8bc0a0397465ea36b8c /sessreg.c | |
parent | 929b2f60c36b80b7a8e6237d5e8ccc981a3a1e0d (diff) |
Stop disabling utmpx & wtmpx calls when -u & -w arguments are passed
The handling of the -u & -w flags would only set utmp_file & wtmp_file,
leaving utmpx_file & wtmpx_file set to NULL, disabling the calls to the
code to update those files.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'sessreg.c')
-rw-r--r-- | sessreg.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -217,11 +217,19 @@ main (int argc, char **argv) wtmp_file = getstring (&argv, &wflag); if (!strcmp (wtmp_file, "none")) wtmp_none = 1; +#if defined(USE_UTMPX) && defined(HAVE_UPDWTMPX) + else + wtmpx_file = wtmp_file; +#endif break; case 'u': utmp_file = getstring (&argv, &uflag); if (!strcmp (utmp_file, "none")) utmp_none = 1; +#if defined(USE_UTMPX) && defined(HAVE_UTMPXNAME) + else + utmpx_file = utmp_file; +#endif break; #ifdef USE_LASTLOG case 'L': |