From adaa3e13243bc808cc4a0d91980ba6fa0a5b4aa8 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 23 Jun 2018 21:08:50 -0500 Subject: system/sysklogd: [PD] no maintainer, fix for utmpx --- system/sysklogd/utmpx.patch | 78 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 system/sysklogd/utmpx.patch (limited to 'system/sysklogd/utmpx.patch') diff --git a/system/sysklogd/utmpx.patch b/system/sysklogd/utmpx.patch new file mode 100644 index 000000000..5f6d75151 --- /dev/null +++ b/system/sysklogd/utmpx.patch @@ -0,0 +1,78 @@ +--- sysklogd-1.5.1/syslogd.c.old 2018-06-23 20:53:59.451604474 -0500 ++++ sysklogd-1.5.1/syslogd.c 2018-06-23 20:58:06.251360126 -0500 +@@ -494,6 +494,9 @@ + * Wed Jul 4 21:02:22 CEST 2007: Martin Schulze + * Open a pipe with O_NOCTTY to avoid them becoming the controlling + * tty and normal files with O_NONBLOCK to avoid blocking. ++ * ++ * Sat Jun 23 20:54:48 CDT 2018: A. Wilcox ++ * Use POSIX instead of non-standard . + */ + + +@@ -511,7 +514,7 @@ + #ifdef SYSV + #include + #endif +-#include ++#include + #include + #include + #include +@@ -557,18 +560,6 @@ + #include + #endif + +-#ifndef UTMP_FILE +-#ifdef UTMP_FILENAME +-#define UTMP_FILE UTMP_FILENAME +-#else +-#ifdef _PATH_UTMP +-#define UTMP_FILE _PATH_UTMP +-#else +-#define UTMP_FILE "/etc/utmp" +-#endif +-#endif +-#endif +- + #ifndef _PATH_LOGCONF + #define _PATH_LOGCONF "/etc/syslog.conf" + #endif +@@ -2036,8 +2027,8 @@ + register int i; + int ttyf, len; + static int reenter = 0; +- struct utmp ut; +- struct utmp *uptr; ++ struct utmpx ut; ++ struct utmpx *uptr; + char greetings[200]; + + (void) &len; +@@ -2046,7 +2037,7 @@ + return; + + /* open the user login file */ +- setutent(); ++ setutxent(); + + + /* +@@ -2066,7 +2057,7 @@ + len = strlen(greetings); + + /* scan the user login file */ +- while ((uptr = getutent())) { ++ while ((uptr = getutxent())) { + memcpy(&ut, uptr, sizeof(ut)); + /* is this slot used? */ + if (ut.ut_name[0] == '\0') +@@ -2120,7 +2111,7 @@ + exit(0); + } + /* close the user login file */ +- endutent(); ++ endutxent(); + reenter = 0; + } + -- cgit v1.2.3-60-g2f50