One of my clients recently started reporting
Bad relative time specifier, should be type(year,month,day,hr,min,sec)
which comes from filters.c. I've tracked the problem down to a very long
(>4096) line in the process table, caused by the longest classpath
specification I have ever seen for a Java program.
The process table is split into lines in LoadProcessTable in process.c
by this section of program
while (!feof(pp))
{
memset(VBUFF,0,CF_BUFSIZE);
ReadLine(VBUFF,CF_BUFSIZE,pp);
AppendItem(procdata,VBUFF,"");
}
which results in the first 4095 characters (CF_BUFSIZE is 4096) being
added to procdata as one item and the remainder as the next. Not
unexpectedly, the remainder doesn't match the expected format, and hence
things start going wrong.
This comes about because ReadLine (in read.c) assumes an fgets call
terminated by reading a newline and does nothing if it didn't, so the
remainder of the line is treated as the next line in the process table
by the next call.
Jim
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine