Subject: Re: gethostname and getdomainname
To: Ignatios Souvatzis <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 11/14/1999 19:16:43
On Nov 15, 1:01am, firstname.lastname@example.org (Ignatios Souvatzis) wrote:
-- Subject: Re: gethostname and getdomainname
| On Sun, Nov 14, 1999 at 10:01:52PM +0100, Ignatios Souvatzis wrote:
| > Didn't need to. First, it returns an errno not documented in sysctl(3), 2nd,
| > I need to explictly get at the length anyhow (for passing it back), so it
| > can use copyout, like before.
| > Here's the kern_sysctl.c patch for review:
| Doesn't work.
| a NULL oldlenp in user space is not properly translated to a null
| pointer in system space in the head of sys___sysctl(). Fixing this requires
| fixing a lot of usage in other (than sysctl_string()) sub-functions...
It has to be.
I think you need to change len to size_t, and initialize oldlen to ~0
if it is null.