diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-08-25 11:02:42 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-08-25 11:02:42 +0000 |
commit | cd0b41ad37004d2b72526d566192f69df0ed1546 (patch) | |
tree | 54e9f32e21f9c63375a411d75f49191bfa2bbfd9 /sys/compat/linux/linux_misc.c | |
parent | fa0e6a0558caaec6cbf70036758a41534bdf0ca0 (diff) | |
download | FreeBSD-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.c | 3 |
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)); } |