From e2eca5fe3e60da4a579cd5f43210552413b4746b Mon Sep 17 00:00:00 2001 From: Chad David Date: Mon, 10 Jun 2002 05:18:00 +0000 Subject: [PATCH] Document the cred_update_thread() function, and fix the RETURN VALUES. --- share/man/man9/ucred.9 | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/share/man/man9/ucred.9 b/share/man/man9/ucred.9 index 73fac3c8e5db..aa80cc9d1763 100644 --- a/share/man/man9/ucred.9 +++ b/share/man/man9/ucred.9 @@ -37,7 +37,8 @@ .Nm crshared , .Nm crcopy , .Nm crdup , -.Nm cru2x +.Nm cru2x , +.NM cred_update_thread .Nd "functions related to user credentials" .Sh SYNOPSIS .In sys/param.h @@ -56,6 +57,8 @@ .Fn crdup "struct ucred *cr" .Ft void .Fn cru2x "struct ucred *cr" "struct xucred *xcr" +.Ft void +.Fn cred_update_thread "struct thread *td" .Sh DESCRIPTION The .Nm @@ -122,10 +125,24 @@ and appropriately sets fields in the latter that are not present in the former (e.g., .Va cr_version ) . +.Pp +The +.Fn cred_update_thread +function sets the credentials of +.Fa td +to that of its process, freeing its old credential if required. .Sh RETURN VALUES -The functions that return values all return a pointer to a +.Fn crget , +.Fn crhold +and +.Fn crdup +all return a pointer to a .Vt ucred structure. +.Pp +.Fn crshared +returns 0 if the credential has a reference count greater than 1; +otherwise, 1 is returned. .Sh SEE ALSO .Xr uihold 9 .Sh AUTHORS