Hi,
Consider this promise:
8<---------
body common control {
bundlesequence => { "mybundle" };
}
bundle agent mybundle {
vars:
"name" string => "jonathan";
commands:
"/bin/echo"
args => "@(name)";
}
8<---------
Running this through cf-promises or cf-agent causes a SEGFAULT (using
versions compiled from svn trunk).
Obviously, this is silly (using @ on a scalar var). However, I feel a
SEGFAULT should be avoided, since it will break any other following
promises.
I have attached a patch against SVN trunk, which corrects the problem.
I'm not sure however that this is the best way to do so... I'm new to
this code :)
Regards,
Jonathan
--
--------------------------------------------------------------
Jonathan Clarke - jonat...@phillipoux.net
--------------------------------------------------------------
Ldap Synchronization Connector (LSC) - http://lsc-project.org
--------------------------------------------------------------
Index: expand.c
===================================================================
--- expand.c (revision 657)
+++ expand.c (working copy)
@@ -641,7 +641,7 @@
{
GetNaked(naked,rval);
- if (GetVariable(scopeid,naked,&(returnval.item),&(returnval.rtype)) == cf_notype)
+ if (GetVariable(scopeid,naked,&(returnval.item),&(returnval.rtype)) == cf_notype || returnval.rtype != CF_LIST)
{
returnval = ExpandPrivateRval("this",rval,rtype);
}
_______________________________________________
Bug-cfengine mailing list
Bug-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/bug-cfengine