From: Pablo Neira Ayuso <pablo@netfilter.org>
To: backup95 <backup95@netcabo.pt>
Cc: netfilter@vger.kernel.org
Subject: Re: Using NFQUEUE from userspace with seteuid
Date: Mon, 01 Mar 2010 21:10:00 +0100 [thread overview]
Message-ID: <4B8C1F18.8010902@netfilter.org> (raw)
In-Reply-To: <1267410505.18948.46.camel@r1>
backup95 wrote:
> Hello,
>
> I wrote a daemon to do packet filtering using libnetfilter-queue.
>
> It works well except that I ran into problems trying to run it
> seteuid/setegid to an unpriviliged user.
>
> Setup and teardown proceeds as root but when I try running the main loop
> seteuid/setegid to a regular user (just processing IP addresses and
> calling nfq_set_verdict really) everything slows to a crawl. I don't get
> any software errors (packets are apparently received and accepted/denied
> as usual) but all my connections time out or error out (not sure which
> yet). Like I said, works fine as root.
>
> I'm at a loss to explain this because as far as I can tell the
> underlying netlink socket mechanism should not depend on root
> priviledges to send messages. It's strange enough that there's a
> significant slow down but no hard errors (and by that I mean
> nfq_set_verdict returning a negative value).
>
> Can anyone at least please confirm that it should work fine and it is
> worth investigating or else just forget it and run the whole thing as
> root?
>
> Any comments would be greatly appreciated.
Could you post the code or a sketch with the relevant section that I
could use to reproduce the problem here?
next prev parent reply other threads:[~2010-03-01 20:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 2:28 Using NFQUEUE from userspace with seteuid backup95
2010-03-01 20:10 ` Pablo Neira Ayuso [this message]
2010-03-02 3:32 ` backup95
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=4B8C1F18.8010902@netfilter.org \
--to=pablo@netfilter.org \
--cc=backup95@netcabo.pt \
--cc=netfilter@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.