1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00

Document the cred_update_thread() function, and fix the RETURN VALUES.

This commit is contained in:
Chad David 2002-06-10 05:18:00 +00:00
parent a13d4e42c2
commit e2eca5fe3e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98081

View File

@ -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