bug-cfengine
[Top][All Lists]
Advanced

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

FileExists bug 2.1.3 thru 2.1.10 (at least)


From: Jerry G. DeLapp
Subject: FileExists bug 2.1.3 thru 2.1.10 (at least)
Date: Wed, 27 Oct 2004 14:59:12 -0600
User-agent: KMail/1.6.2

The following code snippet in functions.c

if (strchr(args,','))
   {
   yyerror("Illegal argument to unary class-function");
   return;
   }

Means that the following statement:

class = FileExists(/a/directory/with/an/RCS/file,v)

will throw the yyerror above instead of actually doing the stat.  The logic of 
HandleStatInfo is forbidding the perfectly valid (*nix) filename character 
','.

A more detailed reading of HandleStatInfo and its invocation makes me think 
that the strchr/yyerror clause shouldn't be there at all.  A patch to dump 
that clause is attached.

I did not check versions prior to 2.1.3 or the latest CVS repository.

-- 
   ***** Correspondence *****

Attachment: cfengine-2.1.3-stat.patch
Description: Text Data


reply via email to

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