Source-Changes-HG archive

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

[src/trunk]: src/dist/am-utils/amq Don't take into account zero length mountp...



details:   https://anonhg.NetBSD.org/src/rev/c14b8f05b9c4
branches:  trunk
changeset: 580430:c14b8f05b9c4
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 23 22:18:17 2005 +0000

description:
Don't take into account zero length mountpoints.

diffstat:

 dist/am-utils/amq/pawd.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r b1d55726f5b2 -r c14b8f05b9c4 dist/am-utils/amq/pawd.c
--- a/dist/am-utils/amq/pawd.c  Sat Apr 23 21:12:47 2005 +0000
+++ b/dist/am-utils/amq/pawd.c  Sat Apr 23 22:18:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pawd.c,v 1.4 2005/04/23 18:38:18 christos Exp $        */
+/*     $NetBSD: pawd.c,v 1.5 2005/04/23 22:18:17 christos Exp $        */
 
 /*
  * Copyright (c) 1997-2005 Erez Zadok
@@ -70,7 +70,7 @@
   while (mt) {
     if (!STREQ(mt->mt_type, "toplvl")) {
       int len = strlen(mt->mt_mountpoint);
-      if (NSTREQ(mt->mt_mountpoint, dir, len) &&
+      if (len && NSTREQ(mt->mt_mountpoint, dir, len) &&
          ((dir[len] == '\0') || (dir[len] == '/'))) {
        char tmp_buf[MAXPATHLEN];
        strlcpy(tmp_buf, mt->mt_directory, sizeof(tmp_buf));



Home | Main Index | Thread Index | Old Index