help-cfengine
[Top][All Lists]
Advanced

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

Globbing imports patch


From: Matthew Palmer
Subject: Globbing imports patch
Date: Wed, 28 Dec 2005 20:31:51 +1100
User-agent: Mutt/1.5.9i

I finally bit the bullet and dug into the cfagent source code -- and I
not only survived, but came back with a neat little globbing method for
import stanzas, along with a test case.

Caveats:
* I have no idea how portable this whole thing is.  glob() is supposed to be
POSIX.2, and I've only used the basic features, but who knows what craziness
is out there in the wide world.

* I haven't totally thought-through the security implications of this change
yet.  IMAO, if you let untrusted users drop files into your directories,
you deserve what you get, but I'm happy enough to accept that not everyone
is as brutal as I am.

glob_import.patch is the patch itself, against parse.c.  glob_import.test is
a shell script which, if run in the root directory of a built source tree,
will test the globbing functionality.  I like tests.  <grin>

Patch is GPL v2 licenced.  If there are any problems with the patch, please
let me know, otherwise I look forward to seeing it in an upcoming release of
cfengine.

- Matt

Attachment: glob_import.patch
Description: Text document

Attachment: glob_import.test
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]