[libvirt PATCH 4/4] qemu: virtiofs: use a .log.fs suffix for logs
Daniel P. Berrangé
berrange at redhat.com
Mon Mar 23 17:02:35 UTC 2020
On Mon, Mar 23, 2020 at 05:10:37PM +0100, Ján Tomko wrote:
> As Dave pointed out, someone creative might name a domain
> to make its logfile conflict with a logfile of another
> domain's virtiofsd log.
>
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> Reported-by: Dr. David Alan Gilbert <dgilbert at redhat.com>
> ---
> src/qemu/qemu_virtiofs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c
> index aaa25bcbb8..575b47fd74 100644
> --- a/src/qemu/qemu_virtiofs.c
> +++ b/src/qemu/qemu_virtiofs.c
> @@ -67,9 +67,9 @@ qemuVirtioFSCreateLogFilename(virQEMUDriverConfigPtr cfg,
> {
> g_autofree char *name = NULL;
>
> - name = g_strdup_printf("%s-%s", def->name, alias);
> + name = g_strdup_printf("%s-%s.log.fs", def->name, alias);
Having a logfile that doesn't end in ".log" is pretty gross IMHO
and will mean it isn't caught by logrotate matching *.log
Can't we deal with the clash in another way that preserves .log as a
suffix
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list