document LWP_CACHE_CREDS.
This commit is contained in:
parent
02ade29d04
commit
478ca46add
|
@ -0,0 +1,75 @@
|
|||
.\" $NetBSD: LWP_CACHE_CREDS.9,v 1.1 2007/12/09 08:31:58 yamt Exp $
|
||||
.\"
|
||||
.\" Copyright (c)2007 YAMAMOTO Takashi,
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" ------------------------------------------------------------
|
||||
.Dd December 9, 2007
|
||||
.Dt LWP_CACHE_CREDS 9
|
||||
.Os
|
||||
.\" ------------------------------------------------------------
|
||||
.Sh NAME
|
||||
.Nm LWP_CACHE_CREDS
|
||||
.Nd synchronize LWP credential with process credential
|
||||
.\" ------------------------------------------------------------
|
||||
.Sh SYNOPSIS
|
||||
.In sys/lwp.h
|
||||
.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
.Ft void
|
||||
.Fn LWP_CACHE_CREDS \
|
||||
"lwp_t *l" "struct proc *p"
|
||||
.\" ------------------------------------------------------------
|
||||
.Sh DESCRIPTION
|
||||
.Fn LWP_CACHE_CREDS
|
||||
updates the LWP's cached credential to match with the process' credential
|
||||
if the latter has been changed after the last synchronization.
|
||||
.Pp
|
||||
Each LWPs have its cached credential so that it should be used without
|
||||
worrying about potential of other LWP changing the process' credential.
|
||||
.Fn kauth_cred_get
|
||||
returns the cached credential.
|
||||
.Pp
|
||||
.Fn LWP_CACHE_CREDS
|
||||
is called by MD entry code for system call and various traps.
|
||||
LWPs which can live in kernel for long period should call
|
||||
.Fn LWP_CACHE_CREDS
|
||||
by itsself to refresh its credential.
|
||||
.Pp
|
||||
.Fn LWP_CACHE_CREDS
|
||||
takes the following arguments.
|
||||
.Bl -tag -width l
|
||||
.It Fa l
|
||||
The calling lwp.
|
||||
.It Fa p
|
||||
The process which the lwp
|
||||
.Fa l
|
||||
belongs to.
|
||||
.El
|
||||
.Pp
|
||||
.Fn LWP_CACHE_CREDS
|
||||
might be implemented as a macro.
|
||||
.\" ------------------------------------------------------------
|
||||
.Sh SEE ALSO
|
||||
.Xr intro 9 ,
|
||||
.Xr kauth 9
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.256 2007/12/05 05:52:21 ad Exp $
|
||||
# $NetBSD: Makefile,v 1.257 2007/12/09 08:31:58 yamt Exp $
|
||||
|
||||
# Makefile for section 9 (kernel function and variable) manual pages.
|
||||
|
||||
|
@ -30,6 +30,7 @@ MAN= altq.9 arc4random.9 arp.9 audio.9 autoconf.9 \
|
|||
kpause.9 \
|
||||
kfilter_register.9 knote.9 \
|
||||
kprintf.9 kthread.9 linedisc.9 lock.9 log.9 ltsleep.9 \
|
||||
LWP_CACHE_CREDS.9 \
|
||||
makeiplcookie.9 \
|
||||
malloc.9 mb.9 mbuf.9 mca.9 memcmp.9 memcpy.9 memoryallocators.9 \
|
||||
memmove.9 memset.9 \
|
||||
|
|
Loading…
Reference in New Issue