diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 3 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_stat.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 562b37f..031c406 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -702,8 +702,7 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args) bzero(&utsname, sizeof(utsname)); strncpy(utsname.sysname, osname, LINUX_MAX_UTSNAME-1); - strncpy(utsname.nodename, getcredhostname(td->td_ucred), - LINUX_MAX_UTSNAME-1); + getcredhostname(td->td_ucred, utsname.nodename, LINUX_MAX_UTSNAME-1); strncpy(utsname.release, osrelease, LINUX_MAX_UTSNAME-1); strncpy(utsname.version, version, LINUX_MAX_UTSNAME-1); strncpy(utsname.machine, machine, LINUX_MAX_UTSNAME-1); diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c index fbe05a9..a3880d5 100644 --- a/sys/compat/svr4/svr4_stat.c +++ b/sys/compat/svr4/svr4_stat.c @@ -480,9 +480,7 @@ svr4_sys_uname(td, uap) strncpy(sut.sysname, ostype, sizeof(sut.sysname)); sut.sysname[sizeof(sut.sysname) - 1] = '\0'; - strncpy(sut.nodename, getcredhostname(td->td_ucred), - sizeof(sut.nodename)); - sut.nodename[sizeof(sut.nodename) - 1] = '\0'; + getcredhostname(td->td_ucred, sut.nodename, sizeof(sut.nodename)); strncpy(sut.release, osrelease, sizeof(sut.release)); sut.release[sizeof(sut.release) - 1] = '\0'; |