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

Jim Meyering jim at meyering.net
Thu Feb 7 08:16:47 UTC 2008


Mark McLoughlin <markmc at redhat.com> 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 at redhat.com>
>
> 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




More information about the libvir-list mailing list