aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2010-01-21 00:17:34 +0800
committerEd Schouten <ed@FreeBSD.org>2010-01-21 00:17:34 +0800
commit60fca1c6013528a8ad2270b14b411a6b079672e3 (patch)
tree2e808be2f5154658642ac620cd1ccb3c79aa04b4
parent747e3d4a0904a40913220554b192e87ba4fcac21 (diff)
downloadfreebsd-ports-gnome-60fca1c6013528a8ad2270b14b411a6b079672e3.tar.gz
freebsd-ports-gnome-60fca1c6013528a8ad2270b14b411a6b079672e3.tar.zst
freebsd-ports-gnome-60fca1c6013528a8ad2270b14b411a6b079672e3.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
+