All of lore.kernel.org
 help / color / mirror / Atom feed
* Using NFQUEUE from userspace with seteuid
@ 2010-03-01  2:28 backup95
  2010-03-01 20:10 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: backup95 @ 2010-03-01  2:28 UTC (permalink / raw)
  To: netfilter

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.

Jo√£o


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-02  3:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-01  2:28 Using NFQUEUE from userspace with seteuid backup95
2010-03-01 20:10 ` Pablo Neira Ayuso
2010-03-02  3:32   ` backup95

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.