Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ftpd Disable UTMPX support for now, because ftpd mig...
details: https://anonhg.NetBSD.org/src/rev/8a611bf4cda3
branches: trunk
changeset: 535488:8a611bf4cda3
user: christos <christos%NetBSD.org@localhost>
date: Tue Aug 20 13:55:58 2002 +0000
description:
Disable UTMPX support for now, because ftpd might chroot and we need
to keep files open.
diffstat:
libexec/ftpd/Makefile | 4 ++--
libexec/ftpd/ftpd.c | 17 ++++++++++++++---
2 files changed, 16 insertions(+), 5 deletions(-)
diffs (78 lines):
diff -r efcaef3a5b3e -r 8a611bf4cda3 libexec/ftpd/Makefile
--- a/libexec/ftpd/Makefile Tue Aug 20 13:51:09 2002 +0000
+++ b/libexec/ftpd/Makefile Tue Aug 20 13:55:58 2002 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.47 2002/08/19 13:54:34 lukem Exp $
+# $NetBSD: Makefile,v 1.48 2002/08/20 13:55:58 christos Exp $
# @(#)Makefile 8.2 (Berkeley) 4/4/94
.include <bsd.obj.mk>
PROG= ftpd
SRCS= cmds.c conf.c ftpd.c ftpcmd.y logutmp.c logwtmp.c popen.c
-CPPFLAGS+=-I${.CURDIR}
+CPPFLAGS+=-I${.CURDIR} -DSUPPORT_UTMP
DPADD+= ${LIBCRYPT} ${LIBUTIL}
LDADD+= -lcrypt -lutil
MAN= ftpd.conf.5 ftpusers.5 ftpd.8
diff -r efcaef3a5b3e -r 8a611bf4cda3 libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c Tue Aug 20 13:51:09 2002 +0000
+++ b/libexec/ftpd/ftpd.c Tue Aug 20 13:55:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpd.c,v 1.140 2002/08/20 13:51:09 christos Exp $ */
+/* $NetBSD: ftpd.c,v 1.141 2002/08/20 13:55:58 christos Exp $ */
/*
* Copyright (c) 1997-2001 The NetBSD Foundation, Inc.
@@ -109,7 +109,7 @@
#if 0
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: ftpd.c,v 1.140 2002/08/20 13:51:09 christos Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.141 2002/08/20 13:55:58 christos Exp $");
#endif
#endif /* not lint */
@@ -155,7 +155,12 @@
#include <tzfile.h>
#include <unistd.h>
#include <util.h>
+#ifdef SUPPORT_UTMP
#include <utmp.h>
+#endif
+#ifdef SUPPORT_UTMPX
+#include <utmpx.h>
+#endif
#ifdef SKEY
#include <skey.h>
#endif
@@ -184,7 +189,12 @@
off_t file_size;
off_t byte_count;
static char ttyline[20];
+#ifdef SUPPORT_UTMP
static struct utmp utmp; /* for utmp */
+#endif
+#ifdef SUPPORT_UTMPX
+static struct utmpx utmpx; /* for utmpx */
+#endif
static const char *anondir = NULL;
static const char *confdir = _DEFAULT_CONFDIR;
@@ -237,6 +247,7 @@
static enum send_status
send_data_with_mmap(int, int, const struct stat *, int);
static void logrusage(const struct rusage *, const struct rusage *);
+static void logout_utmp(void);
int main(int, char *[]);
@@ -2386,7 +2397,7 @@
* back to the main program loop.
*/
transflag = 0;
- logout_wtmp();
+ logout_utmp();
if (logged_in) {
#ifdef KERBEROS
if (!notickets && krbtkfile_env)
Home |
Main Index |
Thread Index |
Old Index