Hi,
a long time ago someone mentioned that sethostname() and setdomainname()
properly return -EFAULT when passing an invalid pointer to the new name, but
instead of leaving the fields in system_utsname unchanged the nodename and
domainname are set to an empty string.
The behaviour of sys_sethostname() can be verified using the attached program
(sethostname.c); sys_setdomainname() is almost the same so I guess that it
has the same defect :-)
The attached patches fix this.
Stephan