Subject: Re: commoning up code that changes uids and gids
To: None <>
From: Christos Zoulas <>
List: tech-kern
Date: 03/10/2003 13:22:21
In article <>,
David Laight <> wrote:
>> while i did review david's change i think a testsuite is in order.
>> could you do that please david?  jar is right that this is a very
>> senstive area, and a regress check for this would be The Right Thing,
>> in any case.
>I'll look into it, it isn't quite trivial.
>Getting the sv_uid needs the sysctl proc interface.

You can do it by opening /dev/kmem nlist and write.

>Calling the compat system calls is impossible.

Well, again, you can switch your emulation by tweaking you p->p_emul
via /dev/kmem.

>At least 2 suid test programs are required - probably more.


>Actually, you soon find out when this code is broken.  login and su
>excercise most of it.

I agree with that.