From: Laurent Deniel <laurent.deniel@free.fr>
To: netdev@oss.sgi.com
Subject: [patch] superfluous CAP_NET_ADMIN required for some ioctl
Date: Tue, 01 Feb 2005 21:49:14 +0100 [thread overview]
Message-ID: <41FFEB4A.90400@free.fr> (raw)
Hi,
It should be possible to obtain bonding information with
SIOCBOND[SLAVE]INFOQUERY ioctls without root privilege
(like with /proc/net/bonding/bond? or ifconfig).
Laurent
Signed-off-by: Laurent Deniel <laurent.deniel@free.fr>
--- linux-2.6.9.orig/net/core/dev.c 2005-01-08 17:29:55.000000000 +0100
+++ linux-2.6.9/net/core/dev.c 2005-01-08 18:00:01.000000000 +0100
@@ -2692,8 +2692,6 @@ int dev_ioctl(unsigned int cmd, void __u
case SIOCBONDENSLAVE:
case SIOCBONDRELEASE:
case SIOCBONDSETHWADDR:
- case SIOCBONDSLAVEINFOQUERY:
- case SIOCBONDINFOQUERY:
case SIOCBONDCHANGEACTIVE:
case SIOCBRADDIF:
case SIOCBRDELIF:
@@ -2705,6 +2703,20 @@ int dev_ioctl(unsigned int cmd, void __u
rtnl_unlock();
return ret;
+ /*
+ * These ioctl calls:
+ * - can be done by all.
+ * - require strict serialization.
+ * - return a value (but already copied to user)
+ */
+ case SIOCBONDSLAVEINFOQUERY:
+ case SIOCBONDINFOQUERY:
+ dev_load(ifr.ifr_name);
+ rtnl_lock();
+ ret = dev_ifsioc(&ifr, cmd);
+ rtnl_unlock();
+ return ret;
+
case SIOCGIFMEM:
/* Get the per device memory space. We can add this but
* currently do not support it */
reply other threads:[~2005-02-01 20:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=41FFEB4A.90400@free.fr \
--to=laurent.deniel@free.fr \
--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).