help-cfengine
[Top][All Lists]
Advanced

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

Re: cfengine-2.0.5pre2 Segmentation fault with editfiles


From: Thomas Glanzmann
Subject: Re: cfengine-2.0.5pre2 Segmentation fault with editfiles
Date: 13 Jan 2003 20:27:38 GMT
User-agent: slrn/0.9.7.4 (Linux)

> The problem exists on all the OS's I support, Redhat Linux, Sun Solaris
> and SGI Irix.  I have already deployed the new version of cfengine, and
> am really impaired by this development.
> 
> Any suggestions, thoughts or otherwise are greatly needed at this
> time....

Hrm. It works for me. Could you please give me a test scenario that fails for
you? And maybe a backtrace would be helpful.

(faui00k) [/src/cfengine/sithglan/testscenario] cat cfagent.conf 
control:

 any::

  ChecksumUpdates     = ( on )
  ExpireAfter         = ( 120 )
  IfElapsed           = ( 30 )
  Inform              = ( on )
  Warnings            = ( off )
  actionsequence      = ( editfiles )
  domain              = ( informatik.uni-erlangen.de )
  smtpserver          = ( 131.188.30.102 )
  sysadm           = ( address@hidden )

editfiles:
  { /tmp/passwd
     BeginGroupIfFileExists "/tmp/shadow"
     BeginGroupIfNoLineContaining "BlockedforSecurity"
     InsertLine "BlockedforSecurity"
     EndGroup
     EndGroup
  }

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 25774)]
0x0807ce8a in ExpandVarstring (string=0x0, buffer=0xbfff90f4 "", bserver=0x0) 
at varstring.c:207
207     for (i = j = 0; string[i] != '\0'; i++,j++)
(gdb) bt
#0  0x0807ce8a in ExpandVarstring (string=0x0, buffer=0xbfff90f4 "", 
bserver=0x0) at varstring.c:207
#1  0x0806953d in CheckEditSwitches (filename=0x812cb08 "/tmp/passwd", 
actions=0x812cb18) at edittools.c:1469
#2  0x08067361 in DoEditFile (ptr=0x812cc90, filename=0x812cb08 "/tmp/passwd") 
at edittools.c:408
#3  0x08067103 in WrapDoEditFile (ptr=0x812cc90, filename=0x812cb08 
"/tmp/passwd") at edittools.c:331
#4  0x08052cd3 in EditFiles () at do.c:2149
#5  0x0804d173 in DoTree (passes=2, info=0x80897c9 "Main Tree") at 
cfagent.c:1170
#6  0x0804afd2 in main (argc=5, argv=0xbffff414) at cfagent.c:167

The problem is the NULL pointer.

Greetings,
        Thomas


reply via email to

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