aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 9174c77d3112..89912ae6de65 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2961,6 +2961,8 @@ static void dev_change_rx_flags(struct net_device *dev, int flags)
2961static int __dev_set_promiscuity(struct net_device *dev, int inc) 2961static int __dev_set_promiscuity(struct net_device *dev, int inc)
2962{ 2962{
2963 unsigned short old_flags = dev->flags; 2963 unsigned short old_flags = dev->flags;
2964 uid_t uid;
2965 gid_t gid;
2964 2966
2965 ASSERT_RTNL(); 2967 ASSERT_RTNL();
2966 2968
@@ -2985,15 +2987,17 @@ static int __dev_set_promiscuity(struct net_device *dev, int inc)
2985 printk(KERN_INFO "device %s %s promiscuous mode\n", 2987 printk(KERN_INFO "device %s %s promiscuous mode\n",
2986 dev->name, (dev->flags & IFF_PROMISC) ? "entered" : 2988 dev->name, (dev->flags & IFF_PROMISC) ? "entered" :
2987 "left"); 2989 "left");
2988 if (audit_enabled) 2990 if (audit_enabled) {
2991 current_uid_gid(&uid, &gid);
2989 audit_log(current->audit_context, GFP_ATOMIC, 2992 audit_log(current->audit_context, GFP_ATOMIC,
2990 AUDIT_ANOM_PROMISCUOUS, 2993 AUDIT_ANOM_PROMISCUOUS,
2991 "dev=%s prom=%d old_prom=%d auid=%u uid=%u gid=%u ses=%u", 2994 "dev=%s prom=%d old_prom=%d auid=%u uid=%u gid=%u ses=%u",
2992 dev->name, (dev->flags & IFF_PROMISC), 2995 dev->name, (dev->flags & IFF_PROMISC),
2993 (old_flags & IFF_PROMISC), 2996 (old_flags & IFF_PROMISC),
2994 audit_get_loginuid(current), 2997 audit_get_loginuid(current),
2995 current->uid, current->gid, 2998 uid, gid,
2996 audit_get_sessionid(current)); 2999 audit_get_sessionid(current));
3000 }
2997 3001
2998 dev_change_rx_flags(dev, IFF_PROMISC); 3002 dev_change_rx_flags(dev, IFF_PROMISC);
2999 } 3003 }