diff options
-rw-r--r-- | sys/i386/ibcs2/ibcs2_socksys.c | 4 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_stat.c | 4 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_xenix.c | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/sys/i386/ibcs2/ibcs2_socksys.c b/sys/i386/ibcs2/ibcs2_socksys.c index 533b5c9..bdaed8d 100644 --- a/sys/i386/ibcs2/ibcs2_socksys.c +++ b/sys/i386/ibcs2/ibcs2_socksys.c @@ -28,6 +28,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/sysproto.h> +#include <sys/jail.h> #include <sys/kernel.h> #include <sys/sysctl.h> @@ -148,7 +149,8 @@ ibcs2_getipdomainname(td, uap) int len; /* Get the domain name */ - snprintf(hname, sizeof(hname), "%s", hostname); + snprintf(hname, sizeof(hname), "%s", getcredhostname(td->td_ucred)); + dptr = index(hname, '.'); if ( dptr ) dptr++; diff --git a/sys/i386/ibcs2/ibcs2_stat.c b/sys/i386/ibcs2/ibcs2_stat.c index 148da17..cd260dd 100644 --- a/sys/i386/ibcs2/ibcs2_stat.c +++ b/sys/i386/ibcs2/ibcs2_stat.c @@ -34,6 +34,7 @@ #include <sys/file.h> #include <sys/stat.h> #include <sys/filedesc.h> +#include <sys/jail.h> #include <sys/kernel.h> #include <sys/mount.h> #include <sys/vnode.h> @@ -233,7 +234,8 @@ ibcs2_utssys(td, uap) IBCS2_UNAME_RELEASE, sizeof(sut.release) - 1); strncpy(sut.version, IBCS2_UNAME_VERSION, sizeof(sut.version) - 1); - strncpy(machine_name, hostname, sizeof(machine_name) - 1); + strncpy(machine_name, getcredhostname(td->td_ucred), + sizeof(machine_name) - 1); machine_name[sizeof(machine_name) - 1] = 0; p = index(machine_name, '.'); if ( p ) diff --git a/sys/i386/ibcs2/ibcs2_xenix.c b/sys/i386/ibcs2/ibcs2_xenix.c index 2f30195..df701a8 100644 --- a/sys/i386/ibcs2/ibcs2_xenix.c +++ b/sys/i386/ibcs2/ibcs2_xenix.c @@ -34,6 +34,7 @@ #include <sys/systm.h> #include <sys/namei.h> #include <sys/sysproto.h> +#include <sys/jail.h> #include <sys/kernel.h> #include <sys/filio.h> #include <sys/vnode.h> @@ -160,8 +161,8 @@ xenix_utsname(struct thread *td, struct xenix_utsname_args *uap) bzero(&ibcs2_sco_uname, sizeof(struct ibcs2_sco_utsname)); strncpy(ibcs2_sco_uname.sysname, ostype, sizeof(ibcs2_sco_uname.sysname) - 1); - strncpy(ibcs2_sco_uname.nodename, hostname, - sizeof(ibcs2_sco_uname.nodename) - 1); + strncpy(ibcs2_sco_uname.nodename, getcredhostname(td->td_ucred), + sizeof(ibcs2_sco_uname.nodename) - 1); strncpy(ibcs2_sco_uname.release, osrelease, sizeof(ibcs2_sco_uname.release) - 1); strncpy(ibcs2_sco_uname.kernelid, version, |