diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-07-20 18:04:06 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-07-20 18:04:06 +0000 |
commit | a1dbfccada29cd2d3f5980166120dfe9026a94c4 (patch) | |
tree | b01518a255658f2046b44f45b407bc6396d599fc /sys | |
parent | 0e46e726124cd6a6c42e188b188226681e21a3dc (diff) |
In _TM_SELF, permit uname(3); OK deraadt@.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_tame.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/kern/kern_tame.c b/sys/kern/kern_tame.c index b366d84a8ac..3ef4b117af7 100644 --- a/sys/kern/kern_tame.c +++ b/sys/kern/kern_tame.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_tame.c,v 1.8 2015/07/20 17:01:26 nicm Exp $ */ +/* $OpenBSD: kern_tame.c,v 1.9 2015/07/20 18:04:05 schwarze Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -569,12 +569,27 @@ tame_sysctl_check(struct proc *p, int namelen, int *name, void *new) name[0] == CTL_HW && name[1] == HW_SENSORS) return (0); - /* gethostname(), getdomainname(), getpagesize() */ + /* getdomainname(), gethostname(), getpagesize(), uname() */ + if (namelen == 2 && + name[0] == CTL_KERN && name[1] == KERN_DOMAINNAME) + return (0); if (namelen == 2 && name[0] == CTL_KERN && name[1] == KERN_HOSTNAME) return (0); if (namelen == 2 && - name[0] == CTL_KERN && name[1] == KERN_DOMAINNAME) + name[0] == CTL_KERN && name[1] == KERN_OSTYPE) + return (0); + if (namelen == 2 && + name[0] == CTL_KERN && name[1] == KERN_OSRELEASE) + return (0); + if (namelen == 2 && + name[0] == CTL_KERN && name[1] == KERN_OSVERSION) + return (0); + if (namelen == 2 && + name[0] == CTL_KERN && name[1] == KERN_VERSION) + return (0); + if (namelen == 2 && + name[0] == CTL_HW && name[1] == HW_MACHINE) return (0); if (namelen == 2 && name[0] == CTL_HW && name[1] == HW_PAGESIZE) |