freebsd-ports/net/pcnfsd/files/patch-utmp
Ed Schouten 60fca1c601 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)
2010-01-20 16:17:34 +00:00

38 lines
807 B
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- 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