Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

docs/32275: update ucred.9

0 views
Skip to first unread message

Chad David

unread,
Nov 25, 2001, 3:00:21 PM11/25/01
to

>Number: 32275
>Category: docs
>Synopsis: update ucred.9
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sun Nov 25 12:00:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Chad David
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
ACNS Inc.
>Environment:
System: FreeBSD colnta 4.4-STABLE FreeBSD 4.4-STABLE #9: Tue Nov 20 16:38:27 MST 2001 davidc@colnta:/mnt1/obj/usr/src/sys/COLNTA i386



>Description:
The ucred.9 manual page is out of date with the current source.
>How-To-Repeat:
man 9 ucred
>Fix:
Apply this patch.

--- ../../src/share/man/man9/ucred.9 Fri Jul 13 12:35:48 2001
+++ ucred.9 Sun Nov 25 12:43:09 2001
@@ -34,6 +34,7 @@
.Nm crget ,
.Nm crhold ,
.Nm crfree ,
+.Nm crshared ,
.Nm crcopy ,
.Nm crdup
.Nd "functions related to user credentials"
@@ -46,8 +47,10 @@
.Fn crhold "struct ucred *cr"
.Ft void
.Fn crfree "struct ucred *cr"
-.Ft "struct ucred *"
-.Fn crcopy "struct ucred *cr"
+.Ft int
+.Fn crshared "struct ucred *cr"
+.Ft void
+.Fn crcopy "struct ucred *dest" "struct ucred *src"
.Ft "struct ucred *"
.Fn crdup "struct ucred *cr"
.Sh DESCRIPTION
@@ -73,30 +76,31 @@
If the count drops to 0, the storage for the structure is freed.
.Pp
The
+.Fn crshared
+function returns true if the credential is shared.
+A credential is considered to be shared if its reference
+count is greater then one.
+.Pp
+The
.Fn crcopy
-function calls
-.Fn crdup
-to create a new structure, and copies the old credentials,
-if the reference count is greater than 1;
-otherwise, the original is returned.
+function copies the contents of the source (template)
+credential into the destination template.
+The uidinfo structure within the destination is referenced
+by calling
+.Fn uihold .
.Pp
The
.Fn crdup
-function allocates memory for a new structure,
-copies the contents of the original structure
-into it, references the
-.Va cr_uidinfo
-and
-.Va cr_ruidinfo
-fields, sets the reference count
-to 1, and then returns the new structure.
+function allocates memory for a new structure and copies the
+contents of
+.Fa cr
+into it.
+The actual copying is performed by
+.Fn crcopy .
.Sh RETURN VALUES
The functions that return values all return a pointer to a
.Vt ucred
structure.
-In the case of
-.Fn crcopy ,
-the return value may be the same structure you passed to it.
.Sh SEE ALSO
.Xr uihold 9
.Sh AUTHORS

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majo...@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message

0 new messages