Skip to content

Commit

Permalink
userns: Convert __dev_set_promiscuity to use kuids in audit logs
Browse files Browse the repository at this point in the history
Cc: Klaus Heinrich Kiwi <[email protected]>
Cc: Eric Paris <[email protected]>
Acked-by: David S. Miller <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Signed-off-by: "Eric W. Biederman" <[email protected]>
  • Loading branch information
ebiederm committed Aug 15, 2012
1 parent b2e4f54 commit d04a48b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit d04a48b

Please sign in to comment.