FreeBSD Bugzilla – Attachment 17836 Details for
Bug 32275
update ucred.9
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.77 KB, created by
davidc
on 2001-11-25 20:00:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
davidc
Created:
2001-11-25 20:00:02 UTC
Size:
1.77 KB
patch
obsolete
>--- ../../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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32275
: 17836