netdev
[Top] [All Lists]

Re: SIOCETHTOOL ioctl() and a corrupted cmd argument

To: "Patrick R. McManus" <mcmanus@xxxxxxxxxxxx>
Subject: Re: SIOCETHTOOL ioctl() and a corrupted cmd argument
From: Jeff Garzik <jgarzik@xxxxxxxxx>
Date: Wed, 5 Mar 2003 16:41:55 -0500
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20030305213205.GA1227@xxxxxxxxxxxx>
References: <20030305210047.GA10824@xxxxxxxxxxxx> <20030305213205.GA1227@xxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Wed, Mar 05, 2003 at 04:32:05PM -0500, Patrick R. McManus wrote:
> but SIOCETHTOOL shouldn't need perms, right? it has some functionality
> that needs it and some that doesn't, and the driver sorts it
> out.. there isn't a GIOCETHTOOL at all..
> 
> #define ETHTOOL_GSET        0x00000001 /* Get settings. */
> #define ETHTOOL_SSET        0x00000002 /* Set settings, privileged. */


You are correct that comment is misleading... all ethtool does current
requiring CAP_NET_ADMIN.  This is one of the costs of lumping things
under one ioctl, rather than constantly using new ioctls.

It is certainly possible (and reasonable) that a future kernel peeks at
the ioctl and then conditionally checks privs, but this is not currently
the case.

        Jeff




<Prev in Thread] Current Thread [Next in Thread>