summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 7279197..dc8edf5 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$");
#include <sys/vnode.h>
#include <sys/wait.h>
#include <sys/cpuset.h>
-#include <sys/vimage.h>
#include <security/mac/mac_framework.h>
@@ -715,10 +714,10 @@ linux_times(struct thread *td, struct linux_times_args *args)
int
linux_newuname(struct thread *td, struct linux_newuname_args *args)
{
- INIT_VPROCG(TD_TO_VPROCG(td));
struct l_new_utsname utsname;
char osname[LINUX_MAX_UTSNAME];
char osrelease[LINUX_MAX_UTSNAME];
+ struct prison *pr;
char *p;
#ifdef DEBUG
@@ -741,9 +740,10 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args)
}
strlcpy(utsname.machine, linux_platform, LINUX_MAX_UTSNAME);
- mtx_lock(&hostname_mtx);
- strlcpy(utsname.domainname, V_domainname, LINUX_MAX_UTSNAME);
- mtx_unlock(&hostname_mtx);
+ pr = td->td_ucred->cr_prison;
+ mtx_lock(&pr->pr_mtx);
+ strlcpy(utsname.domainname, pr->pr_domain, LINUX_MAX_UTSNAME);
+ mtx_unlock(&pr->pr_mtx);
return (copyout(&utsname, args->buf, sizeof(utsname)));
}
OpenPOWER on IntegriCloud