diff options
| author | 2011-07-07 01:19:39 +0000 | |
|---|---|---|
| committer | 2011-07-07 01:19:39 +0000 | |
| commit | fbf7d76740c1b7b509979f05d8e13dfb66028cff (patch) | |
| tree | e4d1f60018f9ba7e0926e8578367f935db0e5a89 /sys/compat/linux/linux_misc.c | |
| parent | Document extended-precision routines. (diff) | |
| download | wireguard-openbsd-fbf7d76740c1b7b509979f05d8e13dfb66028cff.tar.xz wireguard-openbsd-fbf7d76740c1b7b509979f05d8e13dfb66028cff.zip | |
remove all the old COMPAT_43 syscalls. The option itself remains for
the other things it enables. Move a few old wrappers into linux compat
where they are still being used.
ok deraadt guenther
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
| -rw-r--r-- | sys/compat/linux/linux_misc.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index b6eb3c6f7c7..4733511b35c 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.68 2011/06/05 19:41:09 deraadt Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.69 2011/07/07 01:19:39 tedu Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /*- @@ -55,6 +55,7 @@ #include <sys/signal.h> #include <sys/signalvar.h> #include <sys/socket.h> +#include <sys/sysctl.h> #include <sys/time.h> #include <sys/times.h> #include <sys/vnode.h> @@ -566,6 +567,20 @@ linux_sys_oldolduname(p, v, retval) return copyout(&luts, SCARG(uap, up), sizeof(luts)); } +int +linux_sys_sethostname(struct proc *p, void *v, register_t *retval) +{ + struct linux_sys_sethostname_args *uap = v; + int name; + int error; + + if ((error = suser(p, 0)) != 0) + return (error); + name = KERN_HOSTNAME; + return (kern_sysctl(&name, 1, 0, 0, SCARG(uap, hostname), + SCARG(uap, len), p)); +} + /* * Linux wants to pass everything to a syscall in registers. However, * mmap() has 6 of them. Oops: out of register error. They just pass |
