Re: Merge of per task delay accounting (was Re: 2.6.18 -mm merge plans)

Balbir Singh
2006-06-08T19:38:42Z

Shailabh Nagar wrote:
>> hm. Is it possible to check the privileges of a netlink message sender?
>>
>>
> Not entirely sure. But there's. a check in net/netlink/genetlink.c:
> genl_rcv_msg()
> for
> if ((ops->flags & GENL_ADMIN_PERM) && security_netlink_recv(skb))
> { err = -EPERM;
> goto errout;
> }
>
> and security_netlink_recv(skb), normally set to cap_netlink_recv, checks
> on the skb's effective capability
> being CAP_NET_ADMIN which I thought would be sufficient.
> Need to look further.
>
> If it doesn't turn out to fit properly, sysfs config variable can be used.
>

The genl_ops has a flags field. If the flags field is initialized to
GENL_ADMIN_PERM, then privleges are checked as pointed out by you.

--

Balbir Singh,
Linux Technology Center,
IBM Software Labs