diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2020-08-03 06:13:13 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2020-08-03 06:13:13 +0000 |
commit | f423ead6e5b2e51b0ff08ab3e0f8e846d41223ad (patch) | |
tree | e4fd373e96a1da6d9d1a4e56dd2c86b414f49752 /misc/hxtools/files/patch-sadmin_utmp__register.c | |
parent | Has expired, please use devel/rubygem-grape instead. (diff) |
This is the collection of tools and scripts for different tasks written
by Jan Engelhardt, each of which seems to be too small to warrant their
own project.
WWW: http://inai.de/projects/hxtools/
Notes
Notes:
svn path=/head/; revision=544024
Diffstat (limited to 'misc/hxtools/files/patch-sadmin_utmp__register.c')
-rw-r--r-- | misc/hxtools/files/patch-sadmin_utmp__register.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/misc/hxtools/files/patch-sadmin_utmp__register.c b/misc/hxtools/files/patch-sadmin_utmp__register.c new file mode 100644 index 000000000000..4d5ca49d61a9 --- /dev/null +++ b/misc/hxtools/files/patch-sadmin_utmp__register.c @@ -0,0 +1,50 @@ +--- sadmin/utmp_register.c.orig 2020-07-12 09:44:16 UTC ++++ sadmin/utmp_register.c +@@ -71,8 +71,10 @@ static bool get_options(int *argc, const char ***argv) + .help = "Perform operation on lastlog"}, + {.sh = 'U', .type = HXTYPE_NONE, .ptr = &Opt.op_utmp, + .help = "Perform operation on UTMP"}, ++#if 0 + {.sh = 'W', .type = HXTYPE_NONE, .ptr = &Opt.op_wtmp, + .help = "Perform operation on WTMP"}, ++#endif + {.sh = 'e', .type = HXTYPE_NONE, .ptr = &Opt.epid, + .help = "Encode PID into ut_id"}, + {.sh = 'h', .type = HXTYPE_STRING, .ptr = &Opt.host, +@@ -87,8 +89,10 @@ static bool get_options(int *argc, const char ***argv) + .help = "Unique ID 2", .htyp = "sess"}, + {.sh = 'u', .type = HXTYPE_STRING, .ptr = &Opt.futmp, + .help = "Path to utmp"}, ++#if 0 + {.sh = 'w', .type = HXTYPE_STRING, .ptr = &Opt.fwtmp, + .help = "Path to wtmp"}, ++#endif + HXOPT_AUTOHELP, + HXOPT_TABLEEND, + }; +@@ -181,8 +185,10 @@ static int main2(int argc, const char **argv) + setutxent(); + pututxline(&entry); + } ++#if 0 + if (Opt.op_wtmp) + updwtmpx(Opt.fwtmp, &entry); ++#endif + if (Opt.op_lastlog) + update_lastlog(Opt.flastlog, &entry); + } +@@ -193,11 +199,13 @@ static int main2(int argc, const char **argv) + setutxent(); + pututxline(&entry); + } ++#if 0 + if (Opt.op_wtmp) + updwtmpx(Opt.fwtmp, &entry); ++#endif + } + +- endutent(); ++ endutxent(); + return EXIT_SUCCESS; + } + |