Subject: structs ucred, pcred (and uucred)
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 07/03/2002 15:48:23
About six months ago ucred and uucred were split - removing the
binary link between the in-kernel and userland views of process
credentials.
However pcred still exists as a separate entity (contains the real
and saved ids). ISTM that these fields could be moved into ucred.
(This is a mind blowingly tedious patch for the most part - probably
best done by a script!)

It looks to me as though the pcred structure is never shared (in
spite of comments and a p_refcnt field).  Indeed I was looking
at this because some of the setuid (et al) functions didn't
seem to be checking the reference count properly.
(pcred.p_refcnt is only accessed in init_main.c, kern_exit.c and
kern_fork.c)

	David

-- 
David Laight: david@l8s.co.uk