Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ftpd Change arguments of login_utmp(line, name, host...



details:   https://anonhg.NetBSD.org/src/rev/261039e5dbaa
branches:  trunk
changeset: 537885:261039e5dbaa
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Oct 07 13:29:59 2002 +0000

description:
Change arguments of login_utmp(line, name, host) (to be consistent
with logwtmp(3)/logwtmpx(3)), and call correctly.
Resolves [bin/18498] by Geoff Wing, who identified that the previous
version was being called incorrectly, albiet in a different manner.

diffstat:

 libexec/ftpd/ftpd.c    |  9 +++++----
 libexec/ftpd/version.h |  4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (60 lines):

diff -r ce131a0e7b6c -r 261039e5dbaa libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c       Mon Oct 07 13:26:56 2002 +0000
+++ b/libexec/ftpd/ftpd.c       Mon Oct 07 13:29:59 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpd.c,v 1.144 2002/09/13 02:58:54 itojun Exp $        */
+/*     $NetBSD: ftpd.c,v 1.145 2002/10/07 13:29:59 lukem 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.144 2002/09/13 02:58:54 itojun Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.145 2002/10/07 13:29:59 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -234,6 +234,7 @@
 static void     end_login(void);
 static FILE    *getdatasock(const char *);
 static char    *gunique(const char *);
+static void     login_utmp(const char *, const char *, const char *);
 static void     logremotehost(struct sockinet *);
 static void     lostconn(int);
 static void     myoob(int);
@@ -912,7 +913,7 @@
 }
 
 static void
-login_utmp(const char *name, const char *line, const char *host)
+login_utmp(const char *line, const char *name, const char *host)
 {
 #if defined(SUPPORT_UTMPX) || defined(SUPPORT_UTMP)
        struct timeval tv;
@@ -1090,7 +1091,7 @@
        gidcount = getgroups(sizeof(gidlist), gidlist);
 
        /* open utmp/wtmp before chroot */
-       login_utmp(pw->pw_name, remotehost, ttyline);
+       login_utmp(ttyline, pw->pw_name, remotehost);
 
        logged_in = 1;
 
diff -r ce131a0e7b6c -r 261039e5dbaa libexec/ftpd/version.h
--- a/libexec/ftpd/version.h    Mon Oct 07 13:26:56 2002 +0000
+++ b/libexec/ftpd/version.h    Mon Oct 07 13:29:59 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.46 2002/10/03 02:56:47 lukem Exp $       */
+/*     $NetBSD: version.h,v 1.47 2002/10/07 13:30:00 lukem Exp $       */
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,5 +36,5 @@
  */
 
 #ifndef FTPD_VERSION
-#define        FTPD_VERSION    "NetBSD-ftpd 20021003"
+#define        FTPD_VERSION    "NetBSD-ftpd 20021007"
 #endif



Home | Main Index | Thread Index | Old Index