From MAILER-DAEMON Mon Feb 02 15:18:37 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AnkWi-0005xo-IJ
	for mharc-cfengine-develop@gnu.org; Mon, 02 Feb 2004 15:18:36 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AnkWd-0005wO-VV
	for cfengine-develop@nongnu.org; Mon, 02 Feb 2004 15:18:31 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AnkW1-0005l2-5C
	for cfengine-develop@nongnu.org; Mon, 02 Feb 2004 15:18:25 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AnkW0-0005gw-95
	for cfengine-develop@nongnu.org; Mon, 02 Feb 2004 15:17:52 -0500
Received: from [66.93.249.120] (helo=pixie.madstop.com)
	by mx20.gnu.org with esmtp (Exim 4.24) id 1AnkUZ-00036S-3f
	for cfengine-develop@nongnu.org; Mon, 02 Feb 2004 15:16:23 -0500
Received: by pixie.madstop.com (Postfix, from userid 100)
	id A55EE4C0EE; Mon,  2 Feb 2004 14:16:16 -0600 (CST)
Received: from localhost (localhost [127.0.0.1])
	by pixie.madstop.com (Postfix) with ESMTP id 9D7C3560CD
	for <cfengine-develop@nongnu.org>; Mon,  2 Feb 2004 14:16:16 -0600 (CST)
Date: Mon, 2 Feb 2004 14:16:16 -0600 (CST)
From: "Luke A. Kanies" <luke@madstop.com>
X-X-Sender: luke@pixie
To: Cfengine Developers <cfengine-develop@nongnu.org>
Message-ID: <Pine.GSO.4.51.0402021407190.13743@pixie>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [Cfengine-develop] Patch for do.c
X-BeenThere: cfengine-develop@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Cfengine developers  <cfengine-develop.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/cfengine-develop>, 
	<mailto:cfengine-develop-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/cfengine-develop>
List-Post: <mailto:cfengine-develop@nongnu.org>
List-Help: <mailto:cfengine-develop-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/cfengine-develop>,
	<mailto:cfengine-develop-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2004 20:18:35 -0000

Hi Mark,

Here is a patch for do.c to allow wildcards to match both files and
directories in the 'files' action:

3269c3269
<       if (S_ISDIR(statbuf.st_mode) && WildMatch(extract,dp->d_name))
---
>       if ((S_ISREG(statbuf.st_mode) || S_ISDIR(statbuf.st_mode)) &&
WildMatch(extract,dp->d_name))
3273a3274
>

A very short patch, and very simple.

This causes the following action to behave as one would expect:

files:
	/home/luke/* m=750 action=warnall

Previously this only matched directories; this patch causes it to match
files, also.  Should it match more than files?  Could we just skip the
test and do the action on all types of files?  Maybe just skip certain
files, like links?

I don't know; I'll leave that up to you.  My main concern is that it
matches files.

Here, also, is a small patch to the documentation:

5691a5692,5697
>
> File objects can also contain wildcards using @file{?} and @file{*}.
The
> wildcard @file{*} matches zero or more characters, and @file{?} matches
zero
> or one character.  For instance, @file{/var/log/*.log.?} matches all
rotated
> logs that have a single character extension.
>

Luke

-- 
Of the thirty-six ways of avoiding disaster, running away is best.
                                             -- Chinese Proverb



From MAILER-DAEMON Mon Feb 02 16:07:53 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AnlIP-0001Gh-7C
	for mharc-cfengine-develop@gnu.org; Mon, 02 Feb 2004 16:07:53 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AnlIL-0001Ez-1w
	for cfengine-develop@nongnu.org; Mon, 02 Feb 2004 16:07:49 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AnlEk-0000AI-3v
	for cfengine-develop@nongnu.org; Mon, 02 Feb 2004 16:04:37 -0500
Received: from [66.93.249.120] (helo=pixie.madstop.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AnlD7-00081k-3O
	for cfengine-develop@nongnu.org; Mon, 02 Feb 2004 16:02:25 -0500
Received: by pixie.madstop.com (Postfix, from userid 100)
	id 7E57C4C0E7; Mon,  2 Feb 2004 15:02:21 -0600 (CST)
Received: from localhost (localhost [127.0.0.1])
	by pixie.madstop.com (Postfix) with ESMTP id 7BC9D560CC
	for <cfengine-develop@nongnu.org>; Mon,  2 Feb 2004 15:02:21 -0600 (CST)
Date: Mon, 2 Feb 2004 15:02:21 -0600 (CST)
From: "Luke A. Kanies" <luke@madstop.com>
X-X-Sender: luke@pixie
To: Cfengine Developers <cfengine-develop@nongnu.org>
Message-ID: <Pine.GSO.4.51.0402021459370.13892@pixie>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [Cfengine-develop] "Skipping ignored directory"
X-BeenThere: cfengine-develop@nongnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Cfengine developers  <cfengine-develop.nongnu.org>
List-Unsubscribe: <http://mail.nongnu.org/mailman/listinfo/cfengine-develop>, 
	<mailto:cfengine-develop-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/cfengine-develop>
List-Post: <mailto:cfengine-develop@nongnu.org>
List-Help: <mailto:cfengine-develop-request@nongnu.org?subject=help>
List-Subscribe: <http://mail.nongnu.org/mailman/listinfo/cfengine-develop>,
	<mailto:cfengine-develop-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Feb 2004 21:07:50 -0000

Hi Mark,

What is the purpose of the following line?

Verbose("%s: Skipping ignored directory %s\n",VPREFIX,startpath);

It's line 280 in wrapper.c (as of 2.1.0b5).

I'm especially confused because it looks like it does something along
these lines:

if (not ignored)
	warn about skipping directory
	operate on directory

It's not actually skipping the directory from what I can tell:

cfengine:naadmd02: Skipping ignored directory /home/wzd4845/tmp/funtest
cfengine:naadmd02: /home/wzd4845/tmp/funtest had permission 750, changed
it to 755

So why is it telling me that it's ignoring it when it's patently not
ignoring it?  I would be much less confused if this message were just
removed.

Luke

-- 
I don't always know what I'm talking about, but I'm always pretty much
convinced that I'm right.
                -- musician Mojo Nixon



