aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-21 00:17:34 +0800
committered <ed@FreeBSD.org>2010-01-21 00:17:34 +0800
commita5592ec366e1303b77bd2152e5015cc8c129404b (patch)
treea710710b9090e4fb53ec129d158598b07bb2ac1c
parenta96060982c64457a6562695a6e0c59f849f1a1e1 (diff)
downloadfreebsd-ports-gnome-a5592ec366e1303b77bd2152e5015cc8c129404b.tar.gz
freebsd-ports-gnome-a5592ec366e1303b77bd2152e5015cc8c129404b.tar.zst
freebsd-ports-gnome-a5592ec366e1303b77bd2152e5015cc8c129404b.zip
Just disable wtmp logging.
I looked at the code and even when not using utmpx it completely makes no sense at all to handle logging. It only wrotes login entries to the log files, but never logout entries. This will totally upset last/ac each time you log in. Approved by: miwi (portmgr, implicit)
-rw-r--r--net/pcnfsd/files/patch-utmp38
1 files changed, 38 insertions, 0 deletions
diff --git a/net/pcnfsd/files/patch-utmp b/net/pcnfsd/files/patch-utmp
new file mode 100644
index 000000000000..93f0d623148e
--- /dev/null
+++ b/net/pcnfsd/files/patch-utmp
@@ -0,0 +1,38 @@
+--- pcnfsd_misc.c
++++ pcnfsd_misc.c
+@@ -478,34 +478,7 @@
+
+
+ #else SVR4
+-
+-#include <utmp.h>
+-#ifndef _PATH_WTMP
+-#define _PATH_WTMP "/usr/adm/wtmp"
+-#endif
+-
+-void
+-wlogin(name)
+- char *name;
+-{
+-
+-extern char *getcallername();
+- struct utmp ut;
+-
+- int fd;
+-
+- if(!wtmp_enabled)
+- return;
+- memset((char *)&ut, 0, sizeof (ut));
+- (void) strcpy(ut.ut_line, "PC-NFS");
+- (void) strncpy(ut.ut_name,name,sizeof ut.ut_name);
+- ut.ut_time = time( (time_t *) 0);
+- (void) strncpy(ut.ut_host, getcallername(), sizeof ut.ut_host);
+- if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) {
+- (void)write(fd, (char *)&ut, sizeof(ut));
+- (void)close(fd);
+- }
+-}
++void wlogin(char *name) { }
+ #endif SVR4
+ #endif WTMP
+