On Thu, Feb 7, 2013 at 11:43 AM, Phil Pennock <[email protected]> wrote:
> On 2013-02-07 at 08:42 -0800, Todd Lyons wrote:
>> In log.c, there is a function named log_create.  You pass it a const
> The function:
>     static int
>     log_create(uschar *name)
> See that `static`?  Remove it.
> Static, at file scope, means only visible to this compilation unit, and
> the symbol won't be exported in the .o file to be visible to the linker.

<sigh>

> Which I think you knew, but are having one of those blind-spot moments
> which ended 10 seconds ago with you wanting a wall to bang your head
> against.

I even did an object dump and saw that log_create was 'l'ocal and
log_create_as_exim was 'g'lobal.  I just kept looking right past that
static label.

I ended up going a different route.  I don't like making this function
global.  I don't know enough of the history of the logging subsystem
(or exim for that matter) and I don't want to reduce security in some
esoteric way.

So with that in mind, I wrapped with #ifdef EXPERIMENTAL_DMARC the
following functions.
1. I added to functions.h:
int text_log_create(uschar *);
2. I added to log.c:
text_log_create is basically a wrapper to call log_create, passing the
variable straight through.
3. I added to dmarc.c:
a call to text_log_create with the filename as an (uschar *).

See any issues with this?  To be honest, I feel the security concerns
are the same with this wrapper function since it's just a pass-thru.
I'm testing the code now.

...Todd
-- 
The total budget at all receivers for solving senders' problems is $0.
 If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim 
details at http://www.exim.org/ ##

Reply via email to