[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200812021806.33614.inaky@linux.intel.com>
Date: Tue, 2 Dec 2008 18:06:33 -0800
From: Inaky Perez-Gonzalez <inaky@...ux.intel.com>
To: Johannes Berg <johannes@...solutions.net>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 09/39] wimax: provides user space with information needed when opening a WiMAX device
On Thursday 27 November 2008, Johannes Berg wrote:
> On Wed, 2008-11-26 at 15:07 -0800, Inaky Perez-Gonzalez wrote:
> > When user space wants to open a handle to a WiMAX device, it needs
> > information that is provided as a response to an "open" generic
> > netlink message.
>
> Why is this called "open" when it's not actually any opening that would
> be bracketed with "close"? It seems more like "get info" to me?
The naming is a remnant from when I didn't really understand genl
and there was actually a close; then it got reused to do the discovery
part, but now I am going to kill all that using the iw code you pointed
me to as a guide.
> > + result = -ENOMEM;
> > +static
> > +int wimax_gnl_doit_open(struct sk_buff *skb, struct genl_info *info)
> > +{
> > + int result;
> > + struct wimax_dev *wimax_dev;
> > +
> > + d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
> > + result = -EPERM;
> > + if (security_netlink_recv(skb, CAP_NET_ADMIN))
> > + goto error_perm;
>
> Ehm, you can do that check by adding the flag below...
This was another consequence (as mentioned somewhere else) of me
not knowning how to use libnl properly; with that fixed, this is not
needed now and it is done with GENL_ADMIN_PERM in the policy flags.
Thanks,
--
Inaky
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists