netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Keno Fischer <keno@juliacomputing.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] Add a configure flag to link libc statically
Date: Mon, 16 Jan 2017 18:09:57 +0100	[thread overview]
Message-ID: <20170116170957.GA12470@salvia> (raw)
In-Reply-To: <CABV8kRwNRwGcREYxiD4Z1n2ki6p-2Ke1x0Xm9i4DQtSyE+1pxw@mail.gmail.com>

On Mon, Jan 16, 2017 at 11:39:45AM -0500, Keno Fischer wrote:
[...]
> >> However, for my usage of iptables, I have never actually run into
> >> this situation, and even if I did, I'd rather switch libcs (though I
> >> may be in the minority there). Nevertheless, I think it would be
> >> useful to have this option available for those wanting a statically
> >> linked iptables.
> >
> > I'm trying to understand why you need this. Thanks.
> 
> I'm running docker in a stripped down security-enhanced context where
> everything is statically linked. Docker calls out to iptables to set
> up some firewall rules. So far I have not encountered it needing any
> of the code paths in iptables that would require the shared libraries
> from glibc at runtime. I'm also not the only person in this exact
> situation, e.g.:
> 
> https://github.com/vallinux/base/issues/14

Thanks for explaining.

It would be good if you can extend iptables building system to catch
up with glibc case by rejecting it. Another thing would be to add some
small documentation file on the tree that explains how to use this
with musl/ulibc.

My only concern about this new option is that people may believe this
works out of the box, and so far my impression is that this needs some
trickery.

I also wonder if everything is going to work fine with alternative
libc libraries, it would be good to run iptables tests (see
iptables-test.py) on this binary, you can edit the variable on that
script that points to the iptables binary to be tested.

Another alternative if the resulting patch is simple, probably we can
allow the override directive so you can easily append -all-static to
LDFLAGS at your own risk?

https://www.gnu.org/software/make/manual/make.html#Override-Directive

      reply	other threads:[~2017-01-16 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30  5:44 [PATCH] Add a configure flag to link libc statically Keno Fischer
2017-01-16 12:57 ` Pablo Neira Ayuso
2017-01-16 16:39   ` Keno Fischer
2017-01-16 17:09     ` Pablo Neira Ayuso [this message]

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=20170116170957.GA12470@salvia \
    --to=pablo@netfilter.org \
    --cc=keno@juliacomputing.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).