[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1344889115-21610-2-git-send-email-ebiederm@xmission.com>
Date: Mon, 13 Aug 2012 13:18:16 -0700
From: "Eric W. Biederman" <ebiederm@...ssion.com>
To: <netdev@...r.kernel.org>
Cc: <linux-kernel@...r.kernel.org>,
<containers@...ts.linux-foundation.org>,
David Miller <davem@...emloft.net>,
Serge Hallyn <serge@...lyn.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Klaus Heinrich Kiwi <klausk@...ibm.com>,
Eric Paris <eparis@...hat.com>
Subject: [PATCH 02/21] userns: Convert __dev_set_promiscuity to use kuids in audit logs
From: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Klaus Heinrich Kiwi <klausk@...ibm.com>
Cc: Eric Paris <eparis@...hat.com>
Acked-by: Serge Hallyn <serge.hallyn@...onical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
---
net/core/dev.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 0cb3fe8..026bb4a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4492,8 +4492,8 @@ static void dev_change_rx_flags(struct net_device *dev, int flags)
static int __dev_set_promiscuity(struct net_device *dev, int inc)
{
unsigned int old_flags = dev->flags;
- uid_t uid;
- gid_t gid;
+ kuid_t uid;
+ kgid_t gid;
ASSERT_RTNL();
@@ -4525,7 +4525,8 @@ static int __dev_set_promiscuity(struct net_device *dev, int inc)
dev->name, (dev->flags & IFF_PROMISC),
(old_flags & IFF_PROMISC),
audit_get_loginuid(current),
- uid, gid,
+ from_kuid(&init_user_ns, uid),
+ from_kgid(&init_user_ns, gid),
audit_get_sessionid(current));
}
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists