Source-Changes-HG archive

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

[src/trunk]: src/libexec/ftpd fix problem where ftpd.conf lines would match e...



details:   https://anonhg.NetBSD.org/src/rev/e6697d510736
branches:  trunk
changeset: 480381:e6697d510736
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Jan 10 08:03:50 2000 +0000

description:
fix problem where ftpd.conf lines would match everything if there was
no template defined. noted by Vebjorn Ljosa <ljosa%initio.no@localhost>

diffstat:

 libexec/ftpd/conf.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r cf80b3b7f6bf -r e6697d510736 libexec/ftpd/conf.c
--- a/libexec/ftpd/conf.c       Mon Jan 10 07:44:55 2000 +0000
+++ b/libexec/ftpd/conf.c       Mon Jan 10 08:03:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.26 2000/01/09 10:08:45 lukem Exp $  */
+/*     $NetBSD: conf.c,v 1.27 2000/01/10 08:03:50 lukem Exp $  */
 
 /*-
  * Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: conf.c,v 1.26 2000/01/09 10:08:45 lukem Exp $");
+__RCSID("$NetBSD: conf.c,v 1.27 2000/01/10 08:03:50 lukem Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -161,9 +161,10 @@
                        continue;
                if (strcasecmp(class, "none") == 0)
                        none = 1;
-               if ((strcasecmp(class, findclass) != 0 &&
-                   (template != NULL && strcasecmp(class, template) != 0)) &&
-                   !none && strcasecmp(class, "all") != 0)
+               if (! (strcasecmp(class, findclass) == 0 ||
+                      (template != NULL && strcasecmp(class, template) == 0) ||
+                      none ||
+                      strcasecmp(class, "all") == 0) )
                        continue;
 
                if (strcasecmp(word, "checkportcmd") == 0) {



Home | Main Index | Thread Index | Old Index