help-cfengine
[Top][All Lists]
Advanced

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

Re: import a whole directory of files?


From: Russell Adams
Subject: Re: import a whole directory of files?
Date: Thu, 6 Oct 2005 20:56:59 -0500
User-agent: Mutt/1.4.2.1i

I use an m4 macro to do that. Any .cf file that is executable in the
specified directory gets imported.

Since m4 compiles, that means the list is only generated at compile
time, not dynamically on each run, reducing the risk of running a new
file.

Russell

On Fri, Oct 07, 2005 at 11:08:27AM +1000, Matthew Palmer wrote:
> Is there any way to import a whole directory of files with one import line,
> that is, without having to list all of the filenames individually?  So far,
> I've tried:
> 
> import:
>       hosts/*
>       
> Which produced "cfengine:: Can't open file /tmp/hosts/*"
> 
> and also:
> 
> import:
>       hosts
>       
> Which produced the rather unpleasant error message "input in flex scanner
> failed".
> 
> That's my pool of immediate ideas expended.
> 
> I'm aware of the possible security implications of arbitrarily including
> files which you don't know at config time, but I don't think it's
> worse than running files owned by another user (which cfagent does quite
> happily).  If you specify a directory which other users can write to in your
> cfengine config file, then you pretty much get what you ask for...
> 
> Assuming this functionality doesn't yet exist in cfengine, would a patch to
> provide it likely be accepted?  It would kill several birds with one stone
> in a system I'm working on at the moment.  Which method would be preferred
> -- wildcarding, or just specify a directory?  Wildcarding seems like it'd be
> more explicit, but it's probably a fair bit more coding... <grin>
> 
> - Matt



> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

Attachment: pgppAd7AkX0Uh.pgp
Description: PGP signature


reply via email to

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