summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-08-25 11:02:42 +0000
committerrwatson <rwatson@FreeBSD.org>2006-08-25 11:02:42 +0000
commitcd0b41ad37004d2b72526d566192f69df0ed1546 (patch)
tree54e9f32e21f9c63375a411d75f49191bfa2bbfd9 /sys/compat/linux/linux_misc.c
parentfa0e6a0558caaec6cbf70036758a41534bdf0ca0 (diff)
downloadFreeBSD-src-cd0b41ad37004d2b72526d566192f69df0ed1546.zip
FreeBSD-src-cd0b41ad37004d2b72526d566192f69df0ed1546.tar.gz
Don't call suser_cred() directly from linux_sethostname(), as it just
wraps userland_sysctl(), which performs necessary privilege checks as part of its normal operation. MFC after: 1 week
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index f394e55..d512994 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1459,12 +1459,9 @@ int
linux_sethostname(struct thread *td, struct linux_sethostname_args *args)
{
int name[2];
- int error;
name[0] = CTL_KERN;
name[1] = KERN_HOSTNAME;
- if ((error = suser_cred(td->td_ucred, SUSER_ALLOWJAIL)))
- return (error);
return (userland_sysctl(td, name, 2, 0, 0, 0, args->hostname,
args->len, 0, 0));
}
OpenPOWER on IntegriCloud