From: Pablo Neira Ayuso <pablo@netfilter.org>
To: mancha <mancha1@hush.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: ip{,6}tables-save misleading return code
Date: Thu, 17 Oct 2013 10:39:27 +0200 [thread overview]
Message-ID: <20131017083927.GA8330@localhost> (raw)
In-Reply-To: <20131014203816.CC16360191@smtp.hushmail.com>
Hi,
On Mon, Oct 14, 2013 at 08:38:16PM +0000, mancha wrote:
> Hello, this came up on freenode's #netfilter today.
>
> ip{,6}tables-save(8), when run as an unprivileged user (who
> doesn't have access to /proc/net/ip{,6}_tables_names), displays
> no output and returns 0 because of a Boolean inversion.
>
> luser@myhost:~$ iptables-save; echo $?
> 0
>
> The patch below changes the return to 1 if fopen() fails.
> Additionally, one could add "if (errno == EACCESS)" conditioned
> error messages.
Need your Signed-off-by tag / full name to take this patch, please,
let me know. No need to resend, I'll amend it. Thanks.
next prev parent reply other threads:[~2013-10-17 8:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 20:38 ip{,6}tables-save misleading return code mancha
2013-10-17 8:39 ` Pablo Neira Ayuso [this message]
2013-10-17 18:10 ` mancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131017083927.GA8330@localhost \
--to=pablo@netfilter.org \
--cc=mancha1@hush.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).