- Use the new getcredhostname function in xenix_utsname(),
ibcs2_getipdomainname(), and ibcs2_utssys(). Reviewed by: phk
This commit is contained in:
parent
8f4c8256b2
commit
9fdb8219fa
@ -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++;
|
||||
|
@ -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 )
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user