From: Eric W. Biederman Date: Wed, 23 May 2012 23:01:57 +0000 (-0600) Subject: userns: Convert __dev_set_promiscuity to use kuids in audit logs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d04a48b06d63b6d6e9289ca8a5e6e84ebfe39bfd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git userns: Convert __dev_set_promiscuity to use kuids in audit logs Cc: Klaus Heinrich Kiwi Cc: Eric Paris Acked-by: David S. Miller Acked-by: Serge Hallyn Signed-off-by: "Eric W. Biederman" --- 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) 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)); }