* amq/pawd.c (find_mt): if the auto mount type is used, pawd could
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 30 Sep 2005 03:41:54 +0000 (03:41 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 30 Sep 2005 03:41:54 +0000 (03:41 +0000)
go into an infinite loop since the mt_directory and mt_mountpoint
fields are the same for auto mounts.  Solution: ignore type auto
mounts, similar to toplvl.  Bug fix from Jonathan Chen
<jon+amd@spock.org>.

AUTHORS
ChangeLog
NEWS
amq/pawd.c

diff --git a/AUTHORS b/AUTHORS
index 734720c5d00b6c0284182d9fdb7e98f3db8eb804..c2825212da9e977ff2d70ff09cebb11c6b78e704 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -396,6 +396,7 @@ AIX.
 October 22, 2004: patch/fix to move mlock/mlockall/plock code after the
 fork().
 June 29, 2005: core dump going off end of exported_ap[] array.
+September 29, 2005: patch/fix for pawd not to go into an infinite loop.
 
 * David Rage <rage@ucl.ac.uk>
 January 17, 2005: prevent Amd from logging 'Read-only filesystem' errors
index 83fcc43980ff87331c41eeb024b1f6ec5d1d26ac..6d86382a8fb10cb8465f2a43b6d465384129d09e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2005-09-29  Erez Zadok  <ezk@cs.sunysb.edu>
 
+       * amq/pawd.c (find_mt): if the auto mount type is used, pawd could
+       go into an infinite loop since the mt_directory and mt_mountpoint
+       fields are the same for auto mounts.  Solution: ignore type auto
+       mounts, similar to toplvl.  Bug fix from Jonathan Chen
+       <jon+amd@spock.org>.
+
        * README.attrcache: document test-attrcache script.
 
        * scripts/Makefile.am (noinst_SCRIPTS): build test-attrcache
diff --git a/NEWS b/NEWS
index d4db1cd134abd316f11c642ab94d7ec6795ebe13..0030fe2c296540685575ff07b02e1a90f18eca64 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -43,6 +43,8 @@ XXX: Dan, document sun_map_syntax flag in more detail in am-utils.texi and
        * properly turn off the attrcache in freebsd and openbsd
        * can turn off attrcache on netbsd, but need kernel patch, see
          README.attrcache
+       * pawd goes into an infinite loop on type:=auto
+
 
 Amd now understands a new log_option called "defaults" which is synonymous
 with "fatal,error,user,warning,info" (and is also what logging happens by
index 456de4ffd357832626844899ae145e0a1d82e9ec..ac6765efdd58897f11c3a2406b2d0bf25266cdb3 100644 (file)
@@ -66,7 +66,7 @@ static int
 find_mt(amq_mount_tree *mt, char *dir)
 {
   while (mt) {
-    if (!STREQ(mt->mt_type, "toplvl")) {
+    if (!STREQ(mt->mt_type, "toplvl") && !STREQ(mt->mt_type, "auto")) {
       int len = strlen(mt->mt_mountpoint);
       if (len != 0 && NSTREQ(mt->mt_mountpoint, dir, len) &&
          ((dir[len] == '\0') || (dir[len] == '/'))) {