Re: [patch 1/2] Create directory for saving iptables rules

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

 



Mark McLoughlin <markmc@xxxxxxxxxx> wrote:

> The patch which reworked the iptables rules saving
> accidently dropped the call to virFileMakePath()
> resulting in:
>
>   Failed to saves iptables rules to /var/lib/libvirt/iptables/filter/INPUT.chain : No such file or directory
>
> Re-instate the virFileMakePath() call.
>
> Signed-off-by: Mark McLoughlin <markmc@xxxxxxxxxx>
>
> Index: libvirt/src/iptables.c
> ===================================================================
> --- libvirt.orig/src/iptables.c	2008-02-06 23:14:28.000000000 +0000
> +++ libvirt/src/iptables.c	2008-02-06 23:15:33.000000000 +0000
> @@ -238,6 +238,12 @@
>  #ifdef ENABLE_IPTABLES_LOKKIT
>      int err;
>
> +    if ((err = virFileMakePath(rules->dir))) {
> +        qemudLog(QEMUD_WARN "Failed to create directory %s : %s",
> +                 rules->dir, strerror(err));
> +        return;
> +    }
> +
>      if ((err = writeRules(rules->path, rules->rules, rules->nrules))) {
>          qemudLog(QEMUD_WARN, "Failed to saves iptables rules to %s : %s",
>                   rules->path, strerror(err));

+1, modulo what looks like a missing comma after QEMUD_WARN

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]