[libvirt] Re: [PATCH] libvirtd: new config-file option: unix_sock_dir [was Re: adding tests....
Jim Meyering
jim at meyering.net
Mon Feb 9 13:56:10 UTC 2009
Jim Meyering <jim at meyering.net> wrote:
> "Daniel P. Berrange" <berrange at redhat.com> wrote:
>> [snip]
>>
>>> + if (snprintf(server->logDir, PATH_MAX, "%s/.libvirt/log",
>>> + dir_prefix) >= PATH_MAX)
>>> + goto snprintf_error;
>>
>> If I'm reading correctly, this will cause system logs to get put in
>> the directory /var/.libvirt/log instead of /var/log/libvirt, since
>> this snprintf doesn't take account of uid == SYSTEM_UID as the old
>> code used todo.
>
> Good catch.
> I'd offer to add a root-only test to make sure the log file is
> created as advertised, but would rather first add another config-file
> option: to specify where the log file goes.
I just remembered: the log-file configuration is already possible.
Just put something like this in the config file:
log_outputs="3:file:/path-to-dir/log"
More information about the libvir-list
mailing list