Stefan - I concur that this behavior is not correct, but was  
unfamiliar with the 'minus' notation so I re-read the groups section  
of the documentation. Based on the docs, I would only expect the  
minus to work with NIS netgroups, not arbitrary classes. A more  
conventional syntax for what you want (which does in fact work  
correctly) would be:

groups:
    testclass_1 = ( any )
    testclass = ( !linux )

On Sep 19, 2007, at 5:33 PM, Stefan Wipf wrote:

> the following sample config produces some very
> unexpected and dangerous behavior:
>
> groups:
>   testclass_1 = ( any )
>   testclass = ( any -linux )
>
> one would expect that this configuration would only
> set class 'testclass_1' on linux machines. But the
> exact opposite is true, under the current
> implementation of the '-' syntax, 'testclass_1' does
> _not_ get set on linux machines, but instead
> 'testclass' gets set.
> To be more specific, when cfengine parses the config
> for linux machines, first 'testclass_1' gets
> activated, then 'testclass' gets activated and finally
> 'testclass_1' gets deactivated as cfengine simply
> deletes the first class it finds that starts with the
> string 'testclass' rather than matching the class
> string exactly.
>
> We are running 2.1.21
> Has this been fixed in later releases?
>
>
> FIX:
> replace all occurrences of 'DeleteItemStarting' with
> 'DeleteItemLiteral' in convinstall.c and install.c


  - Eric Sorenson - N37 17.255 W121 55.738  - http://ahpook.vox.com/  -



_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to