diff options
-rw-r--r-- | sys/i386/ibcs2/ibcs2_socksys.c | 2 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_stat.c | 3 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_xenix.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/sys/i386/ibcs2/ibcs2_socksys.c b/sys/i386/ibcs2/ibcs2_socksys.c index bdaed8d..ebe6a50 100644 --- a/sys/i386/ibcs2/ibcs2_socksys.c +++ b/sys/i386/ibcs2/ibcs2_socksys.c @@ -149,7 +149,7 @@ ibcs2_getipdomainname(td, uap) int len; /* Get the domain name */ - snprintf(hname, sizeof(hname), "%s", getcredhostname(td->td_ucred)); + getcredhostname(td->td_ucred, hname, sizeof(hname)); dptr = index(hname, '.'); if ( dptr ) diff --git a/sys/i386/ibcs2/ibcs2_stat.c b/sys/i386/ibcs2/ibcs2_stat.c index cd260dd..3940899 100644 --- a/sys/i386/ibcs2/ibcs2_stat.c +++ b/sys/i386/ibcs2/ibcs2_stat.c @@ -234,9 +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, getcredhostname(td->td_ucred), + getcredhostname(td->td_ucred, machine_name, sizeof(machine_name) - 1); - machine_name[sizeof(machine_name) - 1] = 0; p = index(machine_name, '.'); if ( p ) *p = '\0'; diff --git a/sys/i386/ibcs2/ibcs2_xenix.c b/sys/i386/ibcs2/ibcs2_xenix.c index df701a8..0e40c45 100644 --- a/sys/i386/ibcs2/ibcs2_xenix.c +++ b/sys/i386/ibcs2/ibcs2_xenix.c @@ -161,7 +161,7 @@ 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, getcredhostname(td->td_ucred), + getcredhostname(td->td_ucred, ibcs2_sco_uname.nodename, sizeof(ibcs2_sco_uname.nodename) - 1); strncpy(ibcs2_sco_uname.release, osrelease, sizeof(ibcs2_sco_uname.release) - 1); |