bug-cfengine
[Top][All Lists]
Advanced

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

Massive Bug in class handling


From: Jürgen Holm
Subject: Massive Bug in class handling
Date: Wed, 14 Aug 2002 09:55:10 +0200 (CEST)

Hi,

Run this with -v:
-------------------------------------------------------------------------
control:
        domain  = ( bug )
        site = ( bug )

        AddClasses = ( servers )

        actionsequence = ( links )

        !servers::
                AddClasses = ( rwhod )

        !any::
                AddClasses = ( Im_always_defined )
links:

        /usr/scratch -> /tmp
-------------------------------------------------------------------------

Result: The classes "rwhod" and "Im_always_defined" are always defined,
        regardless if you do -Dservers on the commandline or not

So, using the "!" operator gives wrong code in 1.6.3 and 1.6.4, BUT NOT
in 1.5.4.
I'll be glad if you send me a fix, otherwise I must downgrade all my
hosts to 1.5.4.

Im using mandrake 8.1, but compiling 1.6.4 from www.cfengine.org gave
the same result.

By the way, you have ignored my following bugfix for 1.6.3 with no
response, so the bug exist in 1.6.4 also!

WHY?


mfg,jh


------------------------------ 1.6.3 Bugfix -----------------------------
Date: Thu, 2 May 2002 12:30:07 +0200 (CEST)
From: Juergen Holm <address@hidden>
To: address@hidden
Subject: Bugfix for cfengine 1.6.3

Here is an little bugfix for those, which didn't use ChecksumDatabase
(this didn't work correctly for me over many years [Linux, Mandrake] so
I disabled ChecksumDatabase):


--- cfengine-1.6.3/src/misc.c.orig      Thu May  2 12:10:01 2002
+++ cfengine-1.6.3/src/misc.c   Thu May  2 12:10:49 2002
@@ -457,7 +457,7 @@

 Debug("ChecksumChanged: key %s in %s with data
%s\n",filename,CHECKSUMDB,cfMDPrint(digest));

- if (CHECKSUMDB == NULL)
+ if (CHECKSUMDB[0] == '\0')
    {
    if (ISCFENGINE)
       {


because you do:

if (GetMacroValue("ChecksumDatabase"))
   {
 ...
else
   {
   CHECKSUMDB = strdup("");
   }

in cfd.c





------ Institut fuer Theoretische Physik, Universitaet Goettingen ------

 _______________________   ________.--'-`--._____   Tel:  +49 551 399363
|____==================_)  \_'===================`  FAX:  +49 551 399263
       _,--___.-|__|-.______|=====/  `---'          Post: Dr. J. A. Holm
       `---------._          ~~~~~|                       Bunsenstr. 9
                   `-._ -  -  - ,'                        37073 Goettingen
                       \_____,-'                          Deutschland
        PGP-Key:  http://www.Theorie.Physik.Uni-Goe.de/jh.html
                        "Tee. Earl Grey. Heiss!"






reply via email to

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