netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Patrick R. McManus" <mcmanus@ducksong.com>
To: netdev@oss.sgi.com
Subject: Re: SIOCETHTOOL ioctl() and a corrupted cmd argument
Date: Wed, 5 Mar 2003 16:32:05 -0500	[thread overview]
Message-ID: <20030305213205.GA1227@ducksong.com> (raw)
In-Reply-To: <20030305210047.GA10824@ducksong.com>

[Patrick R. McManus: Mar 05 16:00]

> as a regular user I get 
> Mar  5 15:46:57 mcmanus kernel: general ioctl cmd 89F0, magic 8946
> 

turns out, as I had expected, my report is bogus.. this ioctl is a
fallback after the siocethtool fails. the driver do_ioctl() never gets
invoked at all when the ioctl() is invoked without being root.

this would be because in net/core/dev.c dev_ioctl() they are filtered out:

        case SIOCETHTOOL:
        case SIOCGMIIPHY:
        case SIOCGMIIREG:
            if (!capable(CAP_NET_ADMIN))
                return -EPERM;

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. */

  reply	other threads:[~2003-03-05 21:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-05 21:00 SIOCETHTOOL ioctl() and a corrupted cmd argument Patrick R. McManus
2003-03-05 21:32 ` Patrick R. McManus [this message]
2003-03-05 21:41   ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030305213205.GA1227@ducksong.com \
    --to=mcmanus@ducksong.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).