patch for CFEngine 2.2 src/edittools.c

"Welborn, David" <[email protected]> Mon, 1 Mar 2010 10:42:44 -0600
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <A951B5216F07D941B81D5F0E360EF660F0E1EC135C@ISCEDFW01CXMB01.infosolco.net>
--===============1829828550==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_A951B5216F07D941B81D5F0E360EF660F0E1EC135CISCEDFW01CXMB_"

--_000_A951B5216F07D941B81D5F0E360EF660F0E1EC135CISCEDFW01CXMB_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Mark, et al.,

This patch fixes another  bogus  ""Unknown action in editing of file"" warn=
ings generated in edittools.c
 (similar to fix added in revision 363)

This code was missing from the ASCII Edit section:
*       Repository

Similarly, (after some quick testing),
I also added the codes that were functional (but generated "Cannot use %s i=
n a binary edit" errors) in Binary Edit mode
*       Filter
*       DefineClasses
*       ElseDefineClasses
*       IfElapsed
*       ExpireAfter
*       Repository

(patch below)

Regards,
--David


*** src/edittools.c.orig        Sun Feb 17 03:42:42 2008
--- src/edittools.c     Sun Feb 28 14:18:14 2010
***************
*** 253,258 ****
--- 253,259 ----
        case ElseDefineClasses:
        case EditIfElapsed:
        case EditExpireAfter:
+       case EditRepos:
        case EditSplit:
          break;

***************
*** 1965,1970 ****
--- 1966,1979 ----

     switch(ep->code)
        {
+       case EditFilter:
+       case DefineClasses:
+       case ElseDefineClasses:
+       case EditIfElapsed:
+       case EditExpireAfter:
+       case EditRepos:
+           break;
+
        case WarnIfContainsString:
            WarnIfContainsRegex(memseg,statbuf.st_size,expdata,filename);
            break;

***************************************************************************=
***************=20
This message may contain confidential or proprietary information intended o=
nly for the use of the=20
addressee(s) named above or may contain information that is legally privile=
ged. If you are=20
not the intended addressee, or the person responsible for delivering it to =
the intended addressee,=20
you are hereby notified that reading, disseminating, distributing or copyin=
g this message is strictly=20
prohibited. If you have received this message by mistake, please immediatel=
y notify us by =20
replying to the message and delete the original message and any copies imme=
diately thereafter.=20

Thank you.=20
***************************************************************************=
***************=20
FACLD

--_000_A951B5216F07D941B81D5F0E360EF660F0E1EC135CISCEDFW01CXMB_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii">
<meta name=3D"Generator" content=3D"Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left:=
 #800000 2px solid; } --></style>
</head>
<body>
<font face=3D"Arial, sans-serif" size=3D"2">
<div>Mark, et al.,</div>
<div>&nbsp;</div>
<div>This patch fixes another&nbsp; bogus&nbsp; &quot;&quot;Unknown action =
in editing of file&quot;&quot; warnings generated in edittools.c</div>
<div> (similar to fix added in revision 363)</div>
<div>&nbsp;</div>
<div>This code was missing from the ASCII Edit section:</div>
<ul style=3D"margin-top: 0pt; margin-bottom: 0pt; margin-left: 38pt; ">
<li>Repository</li></ul>
<div>&nbsp;</div>
<div>Similarly, (after some quick testing),</div>
<div>I also added the codes that were functional (but generated &quot;Canno=
t use %s in a binary edit&quot; errors) in Binary Edit mode</div>
<ul style=3D"margin-top: 0pt; margin-bottom: 0pt; margin-left: 38pt; ">
<li>Filter</li><li>DefineClasses</li><li>ElseDefineClasses</li><li>IfElapse=
d</li><li>ExpireAfter</li><li>Repository</li></ul>
<div>&nbsp;</div>
<div>(patch below) </div>
<div>&nbsp;</div>
<div>Regards,</div>
<div>--David</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>*** src/edittools.c.orig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sun=
 Feb 17 03:42:42 2008</div>
<div>--- src/edittools.c&nbsp;&nbsp;&nbsp;&nbsp; Sun Feb 28 14:18:14 2010</=
div>
<div>***************</div>
<div>*** 253,258 ****</div>
<div>--- 253,259 ----</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case ElseDefineClasses:</di=
v>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EditIfElapsed:</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EditExpireAfter:</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EditRepos:</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EditSplit:</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</div>
<div>&nbsp;</div>
<div>***************</div>
<div>*** 1965,1970 ****</div>
<div>--- 1966,1979 ----</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; switch(ep-&gt;code)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EditFilter:</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case DefineClasses:</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case ElseDefineClasses:</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EditIfElapsed:</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EditExpireAfter:</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EditRepos:</div>
<div>&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; brea=
k;</div>
<div>&#43;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case WarnIfContainsString:<=
/div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; War=
nIfContainsRegex(memseg,statbuf.st_size,expdata,filename);</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bre=
ak;</div>
<div>&nbsp;</div>
</font>
<pre>**********************************************************************=
********************=20
This message may contain confidential or proprietary information intended o=
nly for the use of the=20
addressee(s) named above or may contain information that is legally privile=
ged. If you are=20
not the intended addressee, or the person responsible for delivering it to =
the intended addressee,=20
you are hereby notified that reading, disseminating, distributing or copyin=
g this message is strictly=20
prohibited. If you have received this message by mistake, please immediatel=
y notify us by =20
replying to the message and delete the original message and any copies imme=
diately thereafter.=20

Thank you.=20
***************************************************************************=
***************=20
FACLD
</pre></body>
</html>

--_000_A951B5216F07D941B81D5F0E360EF660F0E1EC135CISCEDFW01CXMB_--


--===============1829828550==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1829828550==--