From b977bd68cc54b6cf651d13f0a17ff3954e6f71df Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 30 Sep 2005 03:41:54 +0000 Subject: [PATCH] * 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 . --- AUTHORS | 1 + ChangeLog | 6 ++++++ NEWS | 2 ++ amq/pawd.c | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 734720c..c282521 100644 --- 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 January 17, 2005: prevent Amd from logging 'Read-only filesystem' errors diff --git a/ChangeLog b/ChangeLog index 83fcc43..6d86382 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2005-09-29 Erez Zadok + * 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 + . + * README.attrcache: document test-attrcache script. * scripts/Makefile.am (noinst_SCRIPTS): build test-attrcache diff --git a/NEWS b/NEWS index d4db1cd..0030fe2 100644 --- 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 diff --git a/amq/pawd.c b/amq/pawd.c index 456de4f..ac6765e 100644 --- a/amq/pawd.c +++ b/amq/pawd.c @@ -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] == '/'))) { -- 2.43.0