Subject: Re: commoning up code that changes uids and gids
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 03/10/2003 13:22:21
In article <20030310112858.L553@snowdrop.l8s.co.uk>,
David Laight <david@l8s.co.uk> 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.

Yes.

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

I agree with that.

christos