[lkml]   [2002]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectMulticast netlink for non-root process

I'm developping an application that need to monitor every
network interface of the system. Network interfaces are
virtual/dynamic and go up and down all the time, so to keep track of
my interface list, I'm listening for RTM_NEWLINK events on the
RTnetLink socket (RTMGRP_LINK multicast group).

Problem : this works only as ROOT.
And my mother told me that having my application running as
root is bad for my health.

The cause is here :
----------- net/netlink/af_netlink.c - l322 ------------------

static int netlink_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
/* Only superuser is allowed to listen multicasts */
if (nladdr->nl_groups && !capable(CAP_NET_ADMIN))
return -EPERM;

Why ?
Why ?
Why ?

Have a good day...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.036 / U:10.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site