Re: Merge of per task delay accounting (was Re: 2.6.18 -mm mergeplans)
From: Balbir Singh
Date: Thu Jun 08 2006 - 15:37:42 EST
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/