OSDN Git Service

Translate keyutils and special ja.po
[linuxjm/LDP_man-pages.git] / draft / man2 / request_key.2
1 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
2 .\" Written by David Howells (dhowells@redhat.com)
3 .\"
4 .\" %%%LICENSE_START(GPLv2+_SW_ONEPARA)
5 .\" This program is free software; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License
7 .\" as published by the Free Software Foundation; either version
8 .\" 2 of the License, or (at your option) any later version.
9 .\" %%%LICENSE_END
10 .\"
11 .\"*******************************************************************
12 .\"
13 .\" This file was generated with po4a. Translate the source file.
14 .\"
15 .\"*******************************************************************
16 .TH REQUEST_KEY 2 2010\-02\-25 Linux "Linux Key Management Calls"
17 .SH 名前
18 request_key \- カーネルの鍵管理機能から鍵を取得する
19 .SH 書式
20 .nf
21 \fB#include <keyutils.h>\fP
22 .sp
23 \fBkey_serial_t request_key(const char *\fP\fItype\fP\fB, const char *\fP\fIdescription\fP\fB,\fP
24 \fB                         const char *\fP\fIcallout_info\fP\fB,\fP
25 \fB                         key_serial_t \fP\fIkeyring\fP\fB);\fP
26 .fi
27 .SH 説明
28 \fBrequest_key\fP()  asks the kernel to find a key of the given \fItype\fP that
29 matches the specified \fIdescription\fP and, if successful, to attach it to the
30 nominated \fIkeyring\fP and to return its serial number.
31 .P
32 \fBrequest_key\fP()  first recursively searches all the keyrings attached to
33 the calling process in the order thread\-specific keyring, process\-specific
34 keyring and then session keyring for a matching key.
35 .P
36 If \fBrequest_key\fP()  is called from a program invoked by \fBrequest_key\fP()
37 on behalf of some other process to generate a key, then the keyrings of that
38 other process will be searched next, using that other process's UID, GID,
39 groups, and security context to control access.
40 .P
41 The keys in each keyring searched are checked for a match before any child
42 keyrings are recursed into.  Only keys that are \fBsearchable\fP for the caller
43 may be found, and only \fBsearchable\fP keyrings may be searched.
44 .P
45 If the key is not found, then, if \fIcallout_info\fP is set, this function will
46 attempt to look further afield.  In such a case, the \fIcallout_info\fP is
47 passed to a user\-space service such as \fB/sbin/request\-key\fP to generate the
48 key.
49 .P
50 If that is unsuccessful also, then an error will be returned, and a
51 temporary negative key will be installed in the nominated \fIkeyring\fP.  This
52 will expire after a few seconds, but will cause subsequent calls to
53 \fBrequest_key\fP()  to fail until it does.
54 .P
55 The \fIkeyring\fP serial number may be that of a valid keyring to which the
56 caller has write permission, or it may be a special keyring ID:
57 .TP 
58 \fBKEY_SPEC_THREAD_KEYRING\fP
59 この値は呼び出し元スレッド固有の鍵リングを指定する。
60 .TP 
61 \fBKEY_SPEC_PROCESS_KEYRING\fP
62 この値は呼び出し元プロセス固有の鍵リングを指定する。
63 .TP 
64 \fBKEY_SPEC_SESSION_KEYRING\fP
65 この値は呼び出し元セッション固有の鍵リングを指定する。
66 .TP 
67 \fBKEY_SPEC_USER_KEYRING\fP
68 この値は呼び出し元の UID 固有の鍵リングを指定する。
69 .TP 
70 \fBKEY_SPEC_USER_SESSION_KEYRING\fP
71 この値は呼び出し元の UID のセッションの鍵リングを指定する。
72 .P
73 If a key is created, no matter whether it's a valid key or a negative key,
74 it will displace any other key of the same type and description from the
75 destination \fIkeyring\fP.
76 .SH 返り値
77 成功すると \fBrequest_key\fP() は見つかった鍵のシリアル番号を返す。 エラーの場合、 値 \-1 が返され、 \fIerrno\fP
78 にエラーを示す値が設定される。
79 .SH エラー
80 .TP 
81 \fBEACCES\fP
82 そのユーザーは指定された鍵リングを変更できない。
83 .TP 
84 \fBEINTR\fP
85 要求がシングルで中断された。
86 .TP 
87 \fBEDQUOT\fP
88 この鍵を作成するか、鍵を鍵リングに追加すると、 このユーザーの鍵リングのクォータを超過してしまう。
89 .TP 
90 \fBEKEYEXPIRED\fP
91 期限切れの鍵が見つかったが、 新しい代わりの鍵が取得できなかった。
92 .TP 
93 \fBEKEYREJECTED\fP
94 新しい鍵の生成が拒否された。
95 .TP 
96 \fBEKEYREVOKED\fP
97 廃止された鍵が見つかったが、 新しい代わりの鍵が取得できなかった。
98 .TP 
99 \fBENOMEM\fP
100 鍵を作成するのに十分なメモリーがない。
101 .TP 
102 \fBENOKEY\fP
103 合致する鍵が見つからなかった。
104 .SH LINKING
105 これは Linux のシステムコールだが、 \fIlibc\fP には存在せず、 代わりに \fIlibkeyutils\fP に存在する。 リンクする際には、
106 リンカーに \fB\-lkeyutils\fP を指定する必要がある。
107 .SH 関連項目
108 \fBkeyctl\fP(1), \fBadd_key\fP(2), \fBkeyctl\fP(2), \fBrequest\-key\fP(8)
109 .SH この文書について
110 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
111 である。プロジェクトの説明とバグ報告に関する情報は
112 http://www.kernel.org/doc/man\-pages/ に書かれている。