blob: 5f6d7515194e3cf548c374ee6a43e1899ff9ff52 (
plain) (
tree)
|
|
--- 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 <joey@infodrom.org>
* 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 <awilfox@adelielinux.org>
+ * Use POSIX <utmpx.h> instead of non-standard <utmp.h>.
*/
@@ -511,7 +514,7 @@
#ifdef SYSV
#include <sys/types.h>
#endif
-#include <utmp.h>
+#include <utmpx.h>
#include <ctype.h>
#include <string.h>
#include <setjmp.h>
@@ -557,18 +560,6 @@
#include <paths.h>
#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;
}
|