Forum: Cfengine Help
Subject: Limiting recursion into certain directories / filesystems
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,21058,21058#msg-21058

I have a need to search entire machines to identify if certain files are 
present anywhere.  For the sake of discussion, let's say I want to identify 
anything world-writeable.  A few of these systems have file sytems in the 
petabyte range / trillions of files where the application which uses the 
filesystem requires the world-write bit to be set.  I don't want to include 
these files in my report partially because it would make the report useless, 
but I also don't even want Cfengine entering this filesystem, beause simply 
running a find can potentially take upwards of 24 hours.

Unfortunately, I don't have a test system where I can completely replicate this 
scenario, and I'd rather not blindly test on a rather critical system. :)  So, 
I thought I'd ask up here first: If I just specify a directory to skip using 
the standard library's exclude() file_select body, will the recursion code 
continue to traverse the directory or will it work more like the -prune 
argument to find and just sip traversal of the directory?  If not, is there a 
way to tell Cfengine to traverse a directory with infinite recursion, except 
for certain directories?  Or is there a way to tell it to stay within a 
filesystem's boundaries while performing recursion?

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to