diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-05-23 19:01:57 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-08-15 00:42:40 -0400 |
commit | d04a48b06d63b6d6e9289ca8a5e6e84ebfe39bfd (patch) | |
tree | 0f355b4ec7bb9648e5e6f172fbd24f963599607e /net/core/dev.c | |
parent | b2e4f544fddc812d6fe802bab5f600b4b783f45d (diff) |
userns: Convert __dev_set_promiscuity to use kuids in audit logs
Cc: Klaus Heinrich Kiwi <klausk@br.ibm.com>
Cc: Eric Paris <eparis@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | 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 0cb3fe8d8e72..026bb4a37665 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) | |||
4492 | static int __dev_set_promiscuity(struct net_device *dev, int inc) | 4492 | static int __dev_set_promiscuity(struct net_device *dev, int inc) |
4493 | { | 4493 | { |
4494 | unsigned int old_flags = dev->flags; | 4494 | unsigned int old_flags = dev->flags; |
4495 | uid_t uid; | 4495 | kuid_t uid; |
4496 | gid_t gid; | 4496 | kgid_t gid; |
4497 | 4497 | ||
4498 | ASSERT_RTNL(); | 4498 | ASSERT_RTNL(); |
4499 | 4499 | ||
@@ -4525,7 +4525,8 @@ static int __dev_set_promiscuity(struct net_device *dev, int inc) | |||
4525 | dev->name, (dev->flags & IFF_PROMISC), | 4525 | dev->name, (dev->flags & IFF_PROMISC), |
4526 | (old_flags & IFF_PROMISC), | 4526 | (old_flags & IFF_PROMISC), |
4527 | audit_get_loginuid(current), | 4527 | audit_get_loginuid(current), |
4528 | uid, gid, | 4528 | from_kuid(&init_user_ns, uid), |
4529 | from_kgid(&init_user_ns, gid), | ||
4529 | audit_get_sessionid(current)); | 4530 | audit_get_sessionid(current)); |
4530 | } | 4531 | } |
4531 | 4532 | ||