aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 14:43:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 14:43:54 -0500
commitbb26c6c29b7cc9f39e491b074b09f3c284738d36 (patch)
treec7867af2bb4ff0feae889183efcd4d79b0f9a325 /net/core/dev.c
parente14e61e967f2b3bdf23f05e4ae5b9aa830151a44 (diff)
parentcbacc2c7f066a1e01b33b0e27ae5efbf534bc2db (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (105 commits) SELinux: don't check permissions for kernel mounts security: pass mount flags to security_sb_kern_mount() SELinux: correctly detect proc filesystems of the form "proc/foo" Audit: Log TIOCSTI user namespaces: document CFS behavior user namespaces: require cap_set{ug}id for CLONE_NEWUSER user namespaces: let user_ns be cloned with fairsched CRED: fix sparse warnings User namespaces: use the current_user_ns() macro User namespaces: set of cleanups (v2) nfsctl: add headers for credentials coda: fix creds reference capabilities: define get_vfs_caps_from_disk when file caps are not enabled CRED: Allow kernel services to override LSM settings for task actions CRED: Add a kernel_service object class to SELinux CRED: Differentiate objective and effective subjective credentials on a task CRED: Documentation CRED: Use creds in file structs CRED: Prettify commoncap.c CRED: Make execve() take advantage of copy-on-write credentials ...
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 }