[PATCH 2.5.66 & 2.4.20] Fix sys_sethostname() and sys_setdomainname()

From: Stephan Maciej (stephanm@muc.de)
Date: Sun Mar 30 2003 - 15:05:06 EST


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







-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:35 EST