[Top][All Lists]

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

Re: Weird bugs

From: Jason Kim
Subject: Re: Weird bugs
Date: Thu, 29 Sep 2005 21:32:15 -0400
User-agent: KMail/1.8.1

On Wednesday 28 September 2005 23:09, Jason Kim wrote:
> Ok, I'm going to ramble a bit here, but I've been staring down cfengine
> code all day, so please forgive me. I've just gone insane trying to figure
> this out, if anyone actually has the patience to read the whole thing and
> grok it, please let me know if I'm anywhere near on track (and if you can
> help me get my sanity back).
> ======
> <snip...>

I know it's bad form to reply to myself, but after much sleep and coffee I 
feel that I can tackle this in a bit more coherent (and concise) manner...

* There appear to be some email addressing issues with cfexecd's 
mailing function. There was one I sent yesterday about a sscanf function which 
is supposed to grab the domain from a 'MailTo' variable, and one I found 
today where an 'if' statement has the same exact 'then' and 'else' clauses. 
I've attached a patch that I believe corrects the issues.

* The email function can (under some circumstances) use differing 'from' 
addresses, one during the smtp 'MAIL FROM:' section and another in the actual 
message body. Is this intentional? It doesn't seem so, in which case the 
patch I've provided does nothing more than fix a fundamentally broken method. 
In that case I will gladly try to neaten it up some if no one else wants to.

* The main part of my previous email was devoted to the matter of extraneous 
runlog files caused by inconsistent handling of qualified/unqualified 
hostnames by cfexecd and cfagent (I'm going to ignore cfenvd, it's just not 
worth it). It appears that cfagent has the most robust method of getting it 
right, provided that there is a 'domain' variable defined. I propose patching 
cfexecd to instead query cfagent for the correct names, as its current method 
of calling GetNameInfo() doesn't work consistently in all cases. This could 
be as simple as adding 'host' and 'domain' to the list of values that 
GetCfStuff() grabs from cfagent and doing away with GetNameInfo() altogether. 
But if the side effects of GetNameInfo() (setting various name based classes) 
are needed (and I didn't see any sign that they were), I suppose a simple 
correction to VFQNAME, VUQNAME, and VDOMAIN after every GetNameInfo() would 
work too.

There, I hope that was better...

Attachment: cfexecd_mail_patch
Description: Text Data

reply via email to

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