From 7a82645bd3d9602a1fe7020b40756b074f5aebb6 Mon Sep 17 00:00:00 2001 From: Akihiro MOTOKI Date: Tue, 7 May 2013 22:34:53 +0900 Subject: [PATCH] (split) LDP: Translate some pages draft/man2/fallocate.2 draft/man2/lseek.2 draft/man2/mmap.2 draft/man3/getenv.3 draft/man3/malloc_hook.3 draft/man3/malloc_stats.3 draft/man3/strcat.3 draft/man3/strcpy.3 draft/man4/random.4 --- draft/man2/fallocate.2 | 26 +++++++++++----------- draft/man2/lseek.2 | 55 +++++++++++++++++++---------------------------- draft/man2/mmap.2 | 37 ++++++++++++++----------------- draft/man3/getenv.3 | 29 +++++++++++-------------- draft/man3/malloc_hook.3 | 6 ++---- draft/man3/malloc_stats.3 | 16 ++++++-------- draft/man3/strcat.3 | 22 ++++++++----------- draft/man3/strcpy.3 | 30 +++++++++++--------------- draft/man4/random.4 | 39 ++++++++++++++------------------- po4a/memory/po/ja.po | 24 ++++++++++----------- po4a/special/po/ja.po | 16 +++++++------- po4a/stdio/po/ja.po | 22 +++++++++---------- po4a/stdlib/po/ja.po | 16 +++++++------- po4a/string/po/ja.po | 12 +++++------ stats/memory | 4 ---- stats/special | 1 - stats/stdio | 1 - stats/stdlib | 1 - stats/string | 3 --- translation_list | 10 ++++----- untrans.html | 12 +---------- 21 files changed, 157 insertions(+), 225 deletions(-) diff --git a/draft/man2/fallocate.2 b/draft/man2/fallocate.2 index 2a80a5e4..3bc91329 100644 --- a/draft/man2/fallocate.2 +++ b/draft/man2/fallocate.2 @@ -54,19 +54,17 @@ POSIX.1 で規定された方法である \fBposix_fallocate\fP(3) を使うこ 割り当てはブロックサイズ単位で行われるため、 \fBfallocate\fP() は指定されたより も大きなディスク領域を割り当てることがある。 .SS ファイル空間の割り当て解除 -Specifying the \fBFALLOC_FL_PUNCH_HOLE\fP flag (available since Linux 2.6.38) -in \fImode\fP deallocates space (i.e., creates a hole) in the byte range -starting at \fIoffset\fP and continuing for \fIlen\fP bytes. Within the specified -range, partial file system blocks are zeroed, and whole file system blocks -are removed from the file. After a successful call, subsequent reads from -this range will return zeroes. +\fBFALLOC_FL_PUNCH_HOLE\fP フラグ (Linux 2.6.38 以降で利用可能) を \fImode\fP に指定すると、 +\fIoffset\fP で始まる \fIlen\fP バイトの領域の空間を解放する (ホールを作成する)。 指定された範囲のうち、 +部分的に使用しているファイルシステムブロックは 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルから削除される。 +呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 を返す。 -The \fBFALLOC_FL_PUNCH_HOLE\fP flag must be ORed with \fBFALLOC_FL_KEEP_SIZE\fP in -\fImode\fP; in other words, even when punching off the end of the file, the -file size (as reported by \fBstat\fP(2)) does not change. +\fBFALLOC_FL_PUNCH_HOLE\fP フラグは \fBFALLOC_FL_KEEP_SIZE\fP と論理和 (OR) をとって \fImode\fP +に指定しなければならない。 つまり、 ファイル末尾の punch off を行った場合でも、 (\fBstat\fP(2) で報告される) +ファイルサイズが変化しない。 -Not all file systems support \fBFALLOC_FL_PUNCH_HOLE\fP; if a file system -doesn't support the operation, an error is returned. +すべてのファイルシステムで \fBFALLOC_FL_PUNCH_HOLE\fP がサポートされているわけではない。 +ファイルシステムがこの操作をサポートしていない場合は、 エラーが返る。 .SH 返り値 \fBfallocate\fP() は成功すると 0 を返し、エラーの場合は \-1 を返す。 .SH エラー @@ -107,9 +105,9 @@ doesn't support the operation, an error is returned. \fImode\fP をサポートしていない。 .TP \fBEPERM\fP -The file referred to by \fIfd\fP is marked immutable (see \fBchattr\fP(1)). Or: -\fImode\fP specifies \fBFALLOC_FL_PUNCH_HOLE\fP and the file referred to by \fIfd\fP -is marked append\-only (see \fBchattr\fP(1)). +\fIfd\fP が参照するファイルに変更不可 (immutable) の属性が付いている (\fBchattr\fP(1) 参照)。 \fImode\fP に +\fBFALLOC_FL_PUNCH_HOLE\fP が指定されたが、 \fIfd\fP が参照するファイルに追加のみ (append\-only) +の属性が付いている (\fBchattr\fP(1) 参照)。 .TP \fBESPIPE\fP \fIfd\fP がパイプか FIFO を参照している。 diff --git a/draft/man2/lseek.2 b/draft/man2/lseek.2 index 49c4d6a8..4e969590 100644 --- a/draft/man2/lseek.2 +++ b/draft/man2/lseek.2 @@ -74,47 +74,37 @@ lseek \- ファイルの読み書きオフセットの位置を変える \fBlseek\fP() 関数は、オフセットをファイルの末尾を越えた位置に設定できる (但し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置以降に書き込まれた場合、 間の空隙の部分 ("穴 (hole)") の読み出しがあると、 実際にそこにデータを書き込まれるまでは NULL バイト (\(aq\e0\(aq) の列が返される。 -.SS "Seeking file data and holes" -Linux バージョン 3.1 以降では、 -\fIwhence\fP に以下の値も指定することができる。 +.SS ファイルのデータとホールの探索 +Linux バージョン 3.1 以降では、 \fIwhence\fP に以下の値も指定することができる。 .TP \fBSEEK_DATA\fP -Adjust the file offset to the next location in the file greater than or -equal to \fIoffset\fP containing data. If \fIoffset\fP points to data, then the -file offset is set to \fIoffset\fP. +ファイルオフセットを \fIoffset\fP 以上で次にデータがある位置に設定する。 \fIoffset\fP がデータを指している場合には、 +ファイルオフセットは \fIoffset\fP に設定される。 .TP \fBSEEK_HOLE\fP -Adjust the file offset to the next hole in the file greater than or equal to -\fIoffset\fP. If \fIoffset\fP points into the middle of a hole, then the file -offset is set to \fIoffset\fP. If there is no hole past \fIoffset\fP, then the -file offset is adjusted to the end of the file (i.e., there is an implicit -hole at the end of any file). +ファイルオフセットを、 位置が \fIoffset\fP 以上の次のホール (hole) に設定する。 \fIoffset\fP +がホールの内部にある場合は、ファイルシステムは \fIoffset\fP に設定される。 \fIoffset\fP 以降にホールがない場合は、 +ファイルオフセットはファイル末尾に設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということだ)。 .PP -In both of the above cases, \fBlseek\fP() fails if \fIoffset\fP points past the -end of the file. +上記のどちらの場合も、 \fIoffset\fP がファイル末尾よりも先を指している場合には \fBlseek\fP() は失敗する。 -These operations allow applications to map holes in a sparsely allocated -file. This can be useful for applications such as file backup tools, which -can save space when creating backups and preserve holes, if they have a -mechanism for discovering holes. +これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割り当てられたファイルでホールをマップすることができる。 +この機能はファイルバックアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあれば、 ファイルバックアップツールで、 +バックアップを作成する際に保存領域を節約し、ホールを保持することができる。 .\" https://lkml.org/lkml/2011/4/22/79 .\" http://lwn.net/Articles/440255/ .\" http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data -For the purposes of these operations, a hole is a sequence of zeros that -(normally) has not been allocated in the underlying file storage. However, -a file system is not obliged to report holes, so these operations are not a -guaranteed mechanism for mapping the storage space actually allocated to a -file. (Furthermore, a sequence of zeros that actually has been written to -the underlying storage may not be reported as a hole.) In the simplest -implementation, a file system can support the operations by making -\fBSEEK_HOLE\fP always return the offset of the end of the file, and making -\fBSEEK_DATA\fP always return \fIoffset\fP (i.e., even if the location referred to -by \fIoffset\fP is a hole, it can be considered to consist of data that is a -sequence of zeros). +これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレージには割り当てられていない連続する 0 の列である。 +しかし、ファイルシステムにはホールを報告する義務はなく、 そのため、 これらの操作は、 +ファイルに実際に割り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みではない。 +(また、バックエンドのストレージに実際に書き込まれた連続する 0 の列はホールとして報告されないこともある。) 最も単純な実装としては、 +\fBSEEK_HOLE\fP は常にファイル末尾のオフセットを返すようにし、 \fBSEEK_DATA\fP は常に \fIoffset\fP を返すようにすることで、 +ファイルシステムはこれらの操作をサポートすることができる (\fBSEEK_DATA\fP は常に \fIoffset\fP を返すというのは、 \fIoffset\fP +が参照する場所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなすということである)。 -The \fB_GNU_SOURCE\fP feature test macro must be defined in order to obtain the -definitions of \fBSEEK_DATA\fP and \fBSEEK_HOLE\fP from \fI\fP. +\fI\fP から \fBSEEK_DATA\fP と \fBSEEK_HOLE\fP の定義を得るには、 機能検査マクロ +\fB_GNU_SOURCE\fP を定義しなければならない。 .SH 返り値 成功した場合、 \fBlseek\fP() は結果のファイル位置をファイルの先頭からのバイト数で返す。 エラーの場合、値 \fI(off_t)\ \-1\fP が返され、 \fIerrno\fP にエラーが指示される。 @@ -143,9 +133,8 @@ definitions of \fBSEEK_DATA\fP and \fBSEEK_HOLE\fP from \fI\fP. SVr4, 4.3BSD, POSIX.1\-2001. .\" FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future -\fBSEEK_DATA\fP and \fBSEEK_HOLE\fP are nonstandard extensions also present in -Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the -next POSIX revision (Issue 8). +\fBSEEK_DATA\fP と \fBSEEK_HOLE\fP は非標準の拡張で、 Solaris, FreeBSD, DragonFly BSD +にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されている。 .SH 注意 いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが \fBlseek\fP() に対応すべきかは規定していない。 diff --git a/draft/man2/mmap.2 b/draft/man2/mmap.2 index 70241ae4..5e6170c6 100644 --- a/draft/man2/mmap.2 +++ b/draft/man2/mmap.2 @@ -54,7 +54,7 @@ mmap, munmap \- ファイルやデバイスをメモリにマップ/アンマッ \fBint munmap(void *\fP\fIaddr\fP\fB, size_t \fP\fIlength\fP\fB);\fP .fi -See NOTES for information on feature test macro requirements. +機能検査マクロの要件に関する情報は「注意」の節を参照。 .SH 説明 \fBmmap\fP() は、新しいマッピングを呼び出し元プロセスの仮想アドレス空間に作成する。 新しいマッピングの開始アドレスは \fIaddr\fP で指定される。マッピングの長さは \fIlength\fP 引き数で指定される。 @@ -263,9 +263,9 @@ See NOTES for information on feature test macro requirements. \fBMAP_DENYWRITE\fP がセットされているが \fIfd\fP で指定されているオブジェクトは書き込み用に開かれている。 .TP \fBEOVERFLOW\fP -On 32\-bit architecture together with the large file extension (i.e., using -64\-bit \fIoff_t\fP): the number of pages used for \fIlength\fP plus number of -pages used for \fIoffset\fP would overflow \fIunsigned long\fP (32 bits). +32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビットの \fIoff_t\fP を使う場合)、 \fIlength\fP +で使うページ数と \fIoffset\fP で使うページ数を足した値は \fIunsigned long\fP (32 ビット) を超えてしまう +(オーバーフローしてしまう) 場合がある。 .LP マップ領域を利用する際に、以下のシグナルが発生することがある: .TP @@ -303,14 +303,12 @@ SVr4, 4.4BSD, POSIX.1\-2001. にならないように選択される。 \fBMAP_FIXED\fP フラグが指定され、かつ \fIaddr\fP が 0 (NULL) の場合には、マップされるアドレスが 0 (NULL) になる。 -Certain \fIflags\fP constants are defined only if either \fB_BSD_SOURCE\fP or -\fB_SVID_SOURCE\fP is defined. (Requiring \fB_GNU_SOURCE\fP also suffices, and -requiring that macro specifically would have been more logical, since these -flags are all Linux specific.) The relevant flags are: \fBMAP_32BIT\fP, -\fBMAP_ANONYMOUS\fP (and the synonym \fBMAP_ANON\fP), \fBMAP_DENYWRITE\fP, -\fBMAP_EXECUTABLE\fP, \fBMAP_FILE\fP, \fBMAP_GROWSDOWN\fP, \fBMAP_HUGETLB\fP, -\fBMAP_LOCKED\fP, \fBMAP_NONBLOCK\fP, \fBMAP_NORESERVE\fP, \fBMAP_POPULATE\fP, and -\fBMAP_STACK\fP. +特定の \fIflags\fP 定数は \fB_BSD_SOURCE\fP か \fB_SVID_SOURCE\fP のいずれかが定義された場合にのみ定義される。 +(\fB_GNU_SOURCE\fP も定義されている必要がある。これらのフラグはすべて Linux 固有のものなので、 特に \fB_GNU_SOURCE\fP +を必要とする点はもっと論理的に決められるべきであった。) 関係するフラグは \fBMAP_32BIT\fP, \fBMAP_ANONYMOUS\fP +(とその同義語の \fBMAP_ANON\fP), \fBMAP_DENYWRITE\fP, \fBMAP_EXECUTABLE\fP, \fBMAP_FILE\fP, +\fBMAP_GROWSDOWN\fP, \fBMAP_HUGETLB\fP, \fBMAP_LOCKED\fP, \fBMAP_NONBLOCK\fP, +\fBMAP_NORESERVE\fP, \fBMAP_POPULATE\fP, \fBMAP_STACK\fP である。 .SH バグ Linux においては、上記の \fBMAP_NORESERVE\fP で述べられているような保証はない。 デフォルトでは、システムがメモリを使い切った場合には、 どのプロセスがいつ強制終了されるか分からないからである。 @@ -322,15 +320,12 @@ SUSv3 では、 \fIlength\fP が 0 の場合、 \fBmmap\fP() は失敗すると より前のカーネルでは、 この場合に \fBmmap\fP() は成功していた (マッピングは作成されず、 \fIaddr\fP が返されていた)。 カーネル 2.6.12 以降では、 \fBmmap\fP() はエラー \fBEINVAL\fP で失敗する。 -POSIX specifies that the system shall always zero fill any partial page at -the end of the object and that system will never write any modification of -the object beyond its end. On Linux, when you write data to such partial -page after the end of the object, the data stays in the page cache even -after the file is closed and unmapped and even though the data is never -written to the file itself, subsequent mappings may see the modified -content. In some cases, this could be fixed by calling \fBmsync\fP(2) before -the unmap takes place; however, this doesn't work on tmpfs (for example, -when using POSIX shared memory interface documented in \fBshm_overview\fP(7)). +POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より後ろのオブジェクトを決して変更してはならない、と規定している。 +Linux では、 オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 +そのファイルをクローズしてアンマップした後であってもページキャッシュにデータが残り続け、 データがファイル自体に書き込まれていなくても、 +それ以降のマッピングで変更された内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に \fBmsync\fP(2) を呼び出すことで、 +この状況を修正することができる。 しかし、 これは tmpfs では機能しない (例えば、 \fBshm_overview\fP(7) で説明されている +POSIX 共有メモリインターフェースを使った場合)。 .SH 例 .\" FIXME . Add an example here that uses an anonymous shared region for .\" IPC between parent and child. diff --git a/draft/man3/getenv.3 b/draft/man3/getenv.3 index fb81a4d6..bb461aff 100644 --- a/draft/man3/getenv.3 +++ b/draft/man3/getenv.3 @@ -55,25 +55,21 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .SH 説明 関数 \fBgetenv\fP() は、環境リストから名前が \fIname\fP の環境変数を検索し、対応する \fIvalue\fP 文字列へのポインタを返す。 -The GNU\-specific \fBsecure_getenv\fP() function is just like \fBgetenv\fP() -except that it returns NULL in cases where "secure execution" is required. -Secure execution is required if one of the following conditions was true -when the program run by the calling process was loaded: +GNU 固有の \fBsecure_getenv\fP() 関数は \fBgetenv\fP() と同様だが、 "secure execution" +(「安全な実行」) が必要な場合には NULL を返す点が異なる。 "secure execution" が必要となるのは、 +呼び出し元プロセスにより実行されるプログラムがロードされる際に、 以下の条件のいずれか一つが成立する場合である。 .IP * 3 -the process's effective user ID did not match its real user ID or the -process's effective group ID did not match its real group ID (typically this -is the result of executing a set\-user\-ID or set\-group\-ID program); +プロセスの実効ユーザ ID がプロセスの実ユーザ ID と一致しない場合、またはプロセスの実効グループ ID がプロセスの実グループ ID +と一致しない場合 (通常、この状況になるのは、 set\-user\-ID プログラムか set\-group\-ID プログラムを実行した場合である)。 .IP * -the effective capability bit was set on the executable file; or +実行ファイルで実効ケーパビリティビットがセットされている場合。 .IP * -the process has a nonempty permitted capability set. +プロセスの許可ケーパビリティセットが空でない場合。 .PP -Secure execution may also required if triggered by some Linux security -modules. +Linux セキュリティモジュールにより要求された場合にも "secure execution" は必要となる。 -The \fBsecure_getenv\fP() function is intended for use in general\-purpose -libraries to avoid vulnerabilities that could occur if set\-user\-ID or -set\-group\-ID programs accidentally trusted the environment. +\fBsecure_getenv\fP() 関数は、 set\-user\-ID プログラムや set\-group\-ID +プログラムが実行環境を偶然信用してしまった場合に起こり得る脆弱性を、 汎用ライブラリで回避するために使うことを意図して作られた。 .SH 返り値 関数 \fBgetenv\fP() は、環境における値 value へのポインタを返す。 \fIname\fP にマッチする環境変数が存在しないときには NULL を返す。 @@ -93,9 +89,8 @@ set\-group\-ID programs accidentally trusted the environment. の返り値により参照される文字列は静的に割り当てられてもよく、 文字列の内容は後続の \fBgetenv\fP(), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3) の呼び出しにより変更されることがある。 -The "secure execution" mode of \fBsecure_getenv\fP() is controlled by the -\fBAT_SECURE\fP flag contained in the auxiliary vector passed from the kernel -to user space. +\fBsecure_getenv\fP() の "secure execution" モードは、 カーネルからユーザ空間に渡される補助ベクトル +(auxiliary vector) の \fBAT_SECURE\fP フラグにより制御される。 .SH 関連項目 \fBclearenv\fP(3), \fBgetauxval\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBcapabilities\fP(7), \fBenviron\fP(7) diff --git a/draft/man3/malloc_hook.3 b/draft/man3/malloc_hook.3 index 48a612ad..8188d479 100644 --- a/draft/man3/malloc_hook.3 +++ b/draft/man3/malloc_hook.3 @@ -58,10 +58,8 @@ GNU C ライブラリでは、適切なフック関数 (hook function) を指定 .SH 注意 .\" https://bugzilla.redhat.com/show_bug.cgi?id=450187 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=9957 -The use of these hook functions is not safe in multithreaded programs, and -they are now deprecated. Programmers should instead preempt calls to the -relevant functions by defining and exporting functions such as "malloc" and -"free". +マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今では非推奨である。 プログラマは、 "malloc" や "free" +のような関数を定義して公開して、 関連する関数を呼び出すようにすべきである。 .SH 例 これらの変数の使い方の簡単な例を以下に示す。 .sp diff --git a/draft/man3/malloc_stats.3 b/draft/man3/malloc_stats.3 index 144345d5..51b70324 100644 --- a/draft/man3/malloc_stats.3 +++ b/draft/man3/malloc_stats.3 @@ -38,19 +38,15 @@ malloc_stats \- メモリ割り当ての統計を表示する .SH 説明 .\" .SH VERSIONS .\" Available already in glibc 2.0, possibly earlier -The \fBmalloc_stats\fP() function prints (on standard error) statistics about -memory allocated by \fBmalloc\fP(3) and related functions. For each arena -(allocation area), this function prints the total amount of memory allocated -and the total number of bytes consumed by in\-use allocations. (These two -values correspond to the \fIarena\fP and \fIuordblks\fP fields retrieved by -\fBmallinfo\fP(3).) In addition, the function prints the sum of these two -statistics for all arenas, and the maximum number of blocks and bytes that -were ever simultaneously allocated using \fBmmap\fP(2). +\fBmalloc_stats\fP() 関数は \fBmalloc\fP(3) や関連する関数により割り当てられたメモリに関する統計を (標準エラーに) +出力する。 各領域 (割り当てエリア) について、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総バイト数を出力する +(これらの二つの値は \fBmallinfo\fP(3) で取得できる \fIarena\fP と \fIuordblks\fP フィールドに対応している)。 +また、この関数は、 すべての領域のこれら二つの統計情報の合計値と、 \fBmmap\fP(2) +を使って同時に割り当てられたブロック数とバイト数の最大値を表示する。 .SH 準拠 この関数は GNU による拡張である。 .SH 注意 -More detailed information about memory allocations in the main arena can be -obtained using \fBmallinfo\fP(3). +\fBmallinfo\fP(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情報を取得できる。 .SH 関連項目 \fBmmap\fP(2), \fBmallinfo\fP(3), \fBmalloc\fP(3), \fBmalloc_info\fP(3), \fBmallopt\fP(3) .SH この文書について diff --git a/draft/man3/strcat.3 b/draft/man3/strcat.3 index a4a4cde6..0ae9dfd2 100644 --- a/draft/man3/strcat.3 +++ b/draft/man3/strcat.3 @@ -49,8 +49,8 @@ strcat, strncat \- 二つの文字列を連結する \fBstrcat\fP() 関数は、\fIdest\fP 文字列の後に \fIsrc\fP 文字列を付け加える。 その際に、\fIdest\fP の最後にある終端の NULL バイト (\(aq\e0\(aq) は上書きされ、新たに生成された文字列の末尾に終端の NULL バイトが付与される。 二つの文字列 \fIsrc\fP と \fIdest\fP は重なってはならない。 また、文字列 \fIdest\fP は、連結後の結果を格納するのに 十分な大きさでなければならない。 -\fIdest\fP -が十分な大きさでない場合、プログラムがどのような動作をするか分からない。バッファオーバーランはセキュアなプログラムを攻撃する際に好んで使われる方法である。 +\fIdest\fP が十分な大きさでない場合、プログラムがどのような動作をするか分からない。 +バッファオーバーランはセキュアなプログラムを攻撃する際に好んで使われる方法である。 .PP \fBstrncat\fP() も同様だが、以下の点が異なる。 .IP * 3 @@ -94,17 +94,13 @@ SVr4, 4.3BSD, C89, C99. size_t strlcat(char *dest, const char *src, size_t size); .\" https://lwn.net/Articles/506530/ -This function appends the null\-terminated string \fIsrc\fP to the string -\fIdest\fP, copying at most \fIsize\-strlen(dest)\-1\fP from \fIsrc\fP, and adds a null -terminator to the result, \fIunless\fP \fIsize\fP is less than \fIstrlen(dest)\fP. -This function fixes the buffer overrun problem of \fBstrcat\fP(), but the -caller must still handle the possibility of data loss if \fIsize\fP is too -small. The function returns the length of the string \fBstrlcat\fP() tried to -create; if the return value is greater than or equal to \fIsize\fP, data loss -occurred. If data loss matters, the caller \fImust\fP either check the -arguments before the call, or test the function return value. \fBstrlcat\fP() -is not present in glibc and is not standardized by POSIX, but is available -on Linux via the \fIlibbsd\fP library. +この関数は、 NULL 終端された文字列 \fIsrc\fP を文字列 \fIdest\fP に追加する。 具体例には、 \fIsize\fP が +\fIstrlen(dest)\fP より大きい場合には最大で \fIsize\-strlen(dest)\-1\fP バイトを \fIsrc\fP からコピーし、 +結果の末尾に終端の NULL バイトを追加する。 この関数では \fBstrcat\fP() のバッファオーバーランが発生するという問題が修正されているが、 +\fIsize\fP が小さすぎた場合にはデータが失われる問題には、 依然として呼び出し側で対処する必要がある。 この関数は \fBstrlcat\fP() +が作成しようとした文字列の長さを返す。 返り値が \fIsize\fP 以上の場合、 データロスが発生している。 データロスが問題となる場合は、 +呼び出し側で、 呼び出し前に引き数をチェックするか、 この関数の返り値を検査するかのいずれかをしなければならない。 \fBstrlcat\fP() は +glibc には存在せず、 POSIX による標準化もされていないが、 Linux では \fIlibbsd\fP ライブラリ経由で利用できる。 .SH 関連項目 \fBbcopy\fP(3), \fBmemccpy\fP(3), \fBmemcpy\fP(3), \fBstrcpy\fP(3), \fBstring\fP(3), \fBstrncpy\fP(3), \fBwcscat\fP(3), \fBwcsncat\fP(3) diff --git a/draft/man3/strcpy.3 b/draft/man3/strcpy.3 index 4fe81d93..1a58709c 100644 --- a/draft/man3/strcpy.3 +++ b/draft/man3/strcpy.3 @@ -85,11 +85,9 @@ SVr4, 4.3BSD, C89, C99. \fBstrncpy\fP() は効率的でなく間違いを起こしやすいと考えるプログラマもいるだろう。 プログラマが \fIdest\fP の大きさが \fIsrc\fP の長さよりも 大きいことを知っている (つまり、そのことをチェックするコードを 書いている) 場合は、 \fBstrcpy()\fP を使うことができる。 -One valid (and intended) use of \fBstrncpy\fP() is to copy a C string to a -fixed\-length buffer while ensuring both that the buffer is not overflowed -and that unused bytes in the target buffer are zeroed out (perhaps to -prevent information leaks if the buffer is to be written to media or -transmitted to another process via an interprocess communication technique). +\fBstrncpy\fP() の正しい (かつ意図された) 用途は、 C 文字列の固定長バッファへのコピーを、 バッファがオーバーフローしないことと、 +宛先バッファの未使用バイトが 0 で埋められることの両方を保証しつつ行うことである。 (宛先バッファを 0 で埋めるのは、 たいていの場合、 +バッファを媒体に書き込んだり、別のプロセスにプロセス間通信を用いて送信したりした場合に情報洩れを防ぐためである)。 \fIsrc\fP の最初の \fIn\fP バイトに終端のヌルバイトがない場合、 \fBstrncpy\fP() は \fIdest\fP に終端されていない文字列を生成する。以下のようにして @@ -103,8 +101,7 @@ if (n > 0) .fi .in .PP -(Of course, the above technique ignores the fact that information contained -in \fIsrc\fP is lost in the copying to \fIdest\fP.) +(もちろん、上記の方法では、 \fIsrc\fP に入っている情報が \fIdest\fP へのコピー時に失われるという事実は無視している。) いくつかのシステム (BSD、Solaris など) では以下の関数が提供されている。 @@ -114,17 +111,14 @@ in \fIsrc\fP is lost in the copying to \fIdest\fP.) .\" "strlcpy and strlcat - consistent, safe, string copy and concatenation" .\" 1999 USENIX Annual Technical Conference .\" https://lwn.net/Articles/506530/ -This function is similar to \fBstrncpy\fP(), but it copies at most \fIsize\-1\fP -bytes to \fIdest\fP, always adds a terminating null byte, and does not pad the -target with (further) null bytes. This function fixes some of the problems -of \fBstrcpy\fP() and \fBstrncpy\fP(), but the caller must still handle the -possibility of data loss if \fIsize\fP is too small. The return value of the -function is the length of \fIsrc\fP, which allows truncation to be easily -detected: if the return value is greater than or equal to \fIsize\fP, -truncation occurred. If loss of data matters, the caller \fImust\fP either -check the arguments before the call, or test the function return value. -\fBstrlcpy\fP() is not present in glibc and is not standardized by POSIX, but -is available on Linux via the \fIlibbsd\fP library. +この関数は \fBstrncpy\fP() と同様だが、 最大でも \fIsize\-1\fP バイトしか \fIdest\fP にコピーをせず、 末尾への終端の NULL +バイトの追加が必ず行われ、 宛先バッファ (の未使用部分) への NULL バイトの書き込みが行われない。 この関数では \fBstrcpy\fP() や +\fBstrncpy\fP() の持つ問題のいくつかが修正されているが、 \fIsize\fP が小さすぎた場合にはデータが失われる問題には、 +依然として呼び出し側で対処する必要がある。 この関数の返り値は \fIsrc\fP の長さである。 これにより、 +末尾の切り詰めが行われたかを簡単に検出することができる。 返り値が \fIsize\fP 以上の場合には、 末尾の切り詰めが発生している。 +データロスが問題となる場合は、 呼び出し側で、 呼び出し前に引き数をチェックするか、 この関数の返り値を検査するかのいずれかをしなければならない。 +\fBstrlcpy\fP() は glibc には存在せず、 POSIX による標準化もされていないが、 Linux では \fIlibbsd\fP +ライブラリ経由で利用できる。 .SH バグ \fBstrcpy\fP() の受け側の文字列が十分な大きさでない場合、何が起こるかわからない。 固定長文字列を溢れさせるのは、マシンの制御を掌中に収めるために クラッカーが好んで使うテクニックである。 diff --git a/draft/man4/random.4 b/draft/man4/random.4 index 0e874359..1bc916d5 100644 --- a/draft/man4/random.4 +++ b/draft/man4/random.4 @@ -47,10 +47,9 @@ random, urandom \- カーネル乱数ソースデバイス 形で入手できる資料はない、しかし、そのような攻撃は論理的に存在可能である。 もし、この事が心配なら、(\fI/dev/urandom\fP ではなく) \fI/dev/random\fP を利用すればいい。 .LP -Writing to \fI/dev/random\fP or \fI/dev/urandom\fP will update the entropy pool -with the data written, but this will not result in a higher entropy count. -This means that it will impact the contents read from both files, but it -will not make reads from \fI/dev/random\fP faster. +\fI/dev/random\fP や \fI/dev/urandom\fP に書き込みを行うと、 書き込まれたデータでエントロピー・プールが更新される。 しかし、 +エントロピー・カウントが増えるわけではない。 つまり、 \fI/dev/random\fP と \fI/dev/urandom\fP +の両方のファイルから読み出される内容に影響があるが、 \fI/dev/random\fP からの読み出しが早くなるわけではないということだ。 .SS 使い方 \fI/dev/random\fP と \fI/dev/urandom\fP のどちらを使うべきか迷った場合、たいていは \fI/dev/urandom\fP の方を使いたいと思っているはずだろう。 一般に、長期に渡って使われる GPG/SSL/SSH のキー以外の全てのものに \fI/dev/urandom\fP @@ -146,29 +145,25 @@ Linux 2.6: 読み込み専用のファイル \fIuuid\fP と \fIboot_id\fP は 6fd5a44b\-35f4\-4ad4\-a9b9\-6b9be13e1fe9 のような ランダムな文字列を保持している。 前者は読み込みの度に新たに生成され、 後者は 1 度だけ生成される。 .SS "ioctl(2) インタフェース" -The following \fBioctl\fP(2) requests are defined on file descriptors -connected to either \fI/dev/random\fP or \fI/dev/urandom\fP. All requests -performed will interact with the input entropy pool impacting both -\fI/dev/random\fP and \fI/dev/urandom\fP. The \fBCAP_SYS_ADMIN\fP capability is -required for all requests except \fBRNDGETENTCNT\fP. +以下の \fBioctl\fP(2) 要求が \fI/dev/random\fP や \fI/dev/urandom\fP +に接続されたファイルディスクリプタに対して定義されている。 実行されたすべての要求は、 \fI/dev/random\fP と \fI/dev/urandom\fP +に影響を与える入力エントロピー・プールとやり取りを行う。 \fBRNDGETENTCNT\fP 以外のすべての要求には \fBCAP_SYS_ADMIN\fP +ケーパビリティが必要である。 .TP \fBRNDGETENTCNT\fP -Retrieve the entropy count of the input pool, the contents will be the same -as the \fIentropy_avail\fP file under proc. The result will be stored in the -int pointed to by the argument. +入力エントロピー・プールのカウントを取得する。 取得される内容は proc の \fIentropy_avail\fP ファイルと同じである。 +結果は引き数が指す整数 (int) に格納される。 .TP \fBRNDADDTOENTCNT\fP -Increment or decrement the entropy count of the input pool by the value -pointed to by the argument. +入力エントロピー・プールのカウントを引き数が指す値だけ加算または減算する。 .TP \fBRNDGETPOOL\fP Linux 2.6.9 で削除された。 .TP \fBRNDADDENTROPY\fP -Add some additional entropy to the input pool, incrementing the entropy -count. This differs from writing to \fI/dev/random\fP or \fI/dev/urandom\fP, -which only adds some data but does not increment the entropy count. The -following structure is used: +入力プールに追加のエントロピーを追加し、エントロピー・カウントを増やす。 この要求は \fI/dev/random\fP や \fI/dev/urandom\fP +への書き込みとは異なる。 \fI/dev/random\fP や \fI/dev/urandom\fP への書き込みでは、 何らかのデータが追加されるだけで、 +エントロピー・カウントは増やされない。 以下の構造体が使用される。 .IP .nf struct rand_pool_info { @@ -178,13 +173,11 @@ following structure is used: }; .fi .IP -Here \fIentropy_count\fP is the value added to (or subtracted from) the entropy -count, and \fIbuf\fP is the buffer of size \fIbuf_size\fP which gets added to the -entropy pool. +\fIentropy_count\fP はエントロピー・カウントに加算 (または減算) する値である。 \fIbuf\fP は大きさが \fIbuf_size\fP +のバッファで、この内容がエントロピー・プールに追加される。 .TP \fBRNDZAPENTCNT\fP, \fBRNDCLEARPOOL\fP -Zero the entropy count of all pools and add some system data (such as wall -clock) to the pools. +すべてのプールのエントロピー・カウントを 0 にし、何らかのシステムデータ (現在の時刻など) をプールに追加する。 .SH ファイル /dev/random .br diff --git a/po4a/memory/po/ja.po b/po4a/memory/po/ja.po index 06250ec7..8ae36ff8 100644 --- a/po4a/memory/po/ja.po +++ b/po4a/memory/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2013-04-30 20:29+0900\n" -"PO-Revision-Date: 2013-05-06 01:59+0900\n" +"PO-Revision-Date: 2013-05-07 00:42+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -939,7 +939,7 @@ msgid "" "range, partial file system blocks are zeroed, and whole file system blocks " "are removed from the file. After a successful call, subsequent reads from " "this range will return zeroes." -msgstr "" +msgstr "B フラグ (Linux 2.6.38 以降で利用可能) を I に指定すると、 I で始まる I バイトの領域の空間を解放する (ホールを作成する)。 指定された範囲のうち、 部分的に使用しているファイルシステムブロックは 0 で埋められ、 全体を使用しているファイルシステムブロックはそのファイルから削除される。 呼び出しが成功すると、 これ以降のこの範囲からの読み出しでは 0 を返す。" #. type: Plain text #: build/C/man2/fallocate.2:108 @@ -947,14 +947,14 @@ msgid "" "The B flag must be ORed with B in " "I; in other words, even when punching off the end of the file, the " "file size (as reported by B(2)) does not change." -msgstr "" +msgstr "B フラグは B と論理和 (OR) をとって I に指定しなければならない。 つまり、 ファイル末尾の punch off を行った場合でも、 (B(2) で報告される) ファイルサイズが変化しない。" #. type: Plain text #: build/C/man2/fallocate.2:112 msgid "" "Not all file systems support B; if a file system " "doesn't support the operation, an error is returned." -msgstr "" +msgstr "すべてのファイルシステムで B がサポートされているわけではない。 ファイルシステムがこの操作をサポートしていない場合は、 エラーが返る。" #. type: Plain text #: build/C/man2/fallocate.2:115 @@ -1082,7 +1082,7 @@ msgid "" "The file referred to by I is marked immutable (see B(1)). Or: " "I specifies B and the file referred to by I " "is marked append-only (see B(1))." -msgstr "" +msgstr "I が参照するファイルに変更不可 (immutable) の属性が付いている (B(1) 参照)。 I に B が指定されたが、 I が参照するファイルに追加のみ (append-only) の属性が付いている (B(1) 参照)。" #. type: TP #: build/C/man2/fallocate.2:183 build/C/man2/posix_fadvise.2:97 @@ -2488,7 +2488,7 @@ msgid "" "they are now deprecated. Programmers should instead preempt calls to the " "relevant functions by defining and exporting functions such as \"malloc\" " "and \"free\"." -msgstr "" +msgstr "マルチスレッドプログラムでは、 これらのフック関数の使用は安全ではなく、 今では非推奨である。 プログラマは、 \"malloc\" や \"free\" のような関数を定義して公開して、 関連する関数を呼び出すようにすべきである。" #. type: Plain text #: build/C/man3/malloc_hook.3:91 @@ -3137,14 +3137,14 @@ msgid "" "B(3).) In addition, the function prints the sum of these two " "statistics for all arenas, and the maximum number of blocks and bytes that " "were ever simultaneously allocated using B(2)." -msgstr "" +msgstr "B() 関数は B(3) や関連する関数により割り当てられたメモリに関する統計を (標準エラーに) 出力する。 各領域 (割り当てエリア) について、 この関数は割り当てられているメモリの総量と現在の割り当てが使用している総バイト数を出力する (これらの二つの値は B(3) で取得できる I と I フィールドに対応している)。 また、この関数は、 すべての領域のこれら二つの統計情報の合計値と、 B(2) を使って同時に割り当てられたブロック数とバイト数の最大値を表示する。" #. type: Plain text #: build/C/man3/malloc_stats.3:61 msgid "" "More detailed information about memory allocations in the main arena can be " "obtained using B(3)." -msgstr "" +msgstr "B(3) を使用すると、 メイン領域のメモリ割り当てに関するより詳細な情報を取得できる。" #. type: Plain text #: build/C/man3/malloc_stats.3:67 @@ -4898,7 +4898,7 @@ msgstr "" #. type: Plain text #: build/C/man2/mmap.2:54 msgid "See NOTES for information on feature test macro requirements." -msgstr "" +msgstr "機能検査マクロの要件に関する情報は「注意」の節を参照。" #. type: Plain text #: build/C/man2/mmap.2:63 @@ -5591,7 +5591,7 @@ msgid "" "On 32-bit architecture together with the large file extension (i.e., using " "64-bit I): the number of pages used for I plus number of " "pages used for I would overflow I (32 bits)." -msgstr "" +msgstr "32 ビットアーキテクチャで large file 拡張を使っている場合 (つまり 64 ビットの I を使う場合)、 I で使うページ数と I で使うページ数を足した値は I (32 ビット) を超えてしまう (オーバーフローしてしまう) 場合がある。" #. type: Plain text #: build/C/man2/mmap.2:489 @@ -5705,7 +5705,7 @@ msgid "" "B, B, B, B, " "B, B, B, B, and " "B." -msgstr "" +msgstr "特定の I 定数は B<_BSD_SOURCE> か B<_SVID_SOURCE> のいずれかが定義された場合にのみ定義される。 (B<_GNU_SOURCE> も定義されている必要がある。これらのフラグはすべて Linux 固有のものなので、 特に B<_GNU_SOURCE> を必要とする点はもっと論理的に決められるべきであった。) 関係するフラグは B, B (とその同義語の B), B, B, B, B, B, B, B, B, B, B である。" #. type: Plain text #: build/C/man2/mmap.2:592 @@ -5752,7 +5752,7 @@ msgid "" "content. In some cases, this could be fixed by calling B(2) before " "the unmap takes place; however, this doesn't work on tmpfs (for example, " "when using POSIX shared memory interface documented in B(7))." -msgstr "" +msgstr "POSIX では、 システムはオブジェクト末尾の部分ページを常に 0 で埋め、 末尾より後ろのオブジェクトを決して変更してはならない、と規定している。 Linux では、 オブジェクト末尾より後ろの部分ページにデータを書き込んだ場合、 そのファイルをクローズしてアンマップした後であってもページキャッシュにデータが残り続け、 データがファイル自体に書き込まれていなくても、 それ以降のマッピングで変更された内容が見える可能性がある。 いくつかの場合では、 アンマップを行う前に B(2) を呼び出すことで、 この状況を修正することができる。 しかし、 これは tmpfs では機能しない (例えば、 B(7) で説明されている POSIX 共有メモリインターフェースを使った場合)。" #. type: Plain text #: build/C/man2/mmap.2:642 diff --git a/po4a/special/po/ja.po b/po4a/special/po/ja.po index f57c8af8..ee276f3e 100644 --- a/po4a/special/po/ja.po +++ b/po4a/special/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2013-04-30 20:30+0900\n" -"PO-Revision-Date: 2013-05-05 01:57+0900\n" +"PO-Revision-Date: 2013-05-07 01:56+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -9657,7 +9657,7 @@ msgid "" "with the data written, but this will not result in a higher entropy count. " "This means that it will impact the contents read from both files, but it " "will not make reads from I faster." -msgstr "" +msgstr "I や I に書き込みを行うと、 書き込まれたデータでエントロピー・プールが更新される。 しかし、 エントロピー・カウントが増えるわけではない。 つまり、 I と I の両方のファイルから読み出される内容に影響があるが、 I からの読み出しが早くなるわけではないということだ。" #. type: Plain text #: build/C/man4/random.4:74 @@ -9966,7 +9966,7 @@ msgid "" "performed will interact with the input entropy pool impacting both I and I. The B capability is required " "for all requests except B." -msgstr "" +msgstr "以下の B(2) 要求が I や I に接続されたファイルディスクリプタに対して定義されている。 実行されたすべての要求は、 I と I に影響を与える入力エントロピー・プールとやり取りを行う。 B 以外のすべての要求には B ケーパビリティが必要である。" #. type: TP #: build/C/man4/random.4:233 @@ -9980,7 +9980,7 @@ msgid "" "Retrieve the entropy count of the input pool, the contents will be the same " "as the I file under proc. The result will be stored in the " "int pointed to by the argument." -msgstr "" +msgstr "入力エントロピー・プールのカウントを取得する。 取得される内容は proc の I ファイルと同じである。 結果は引き数が指す整数 (int) に格納される。" #. type: TP #: build/C/man4/random.4:240 @@ -9993,7 +9993,7 @@ msgstr "B" msgid "" "Increment or decrement the entropy count of the input pool by the value " "pointed to by the argument." -msgstr "" +msgstr "入力エントロピー・プールのカウントを引き数が指す値だけ加算または減算する。" #. type: TP #: build/C/man4/random.4:244 @@ -10019,7 +10019,7 @@ msgid "" "count. This differs from writing to I or I, " "which only adds some data but does not increment the entropy count. The " "following structure is used:" -msgstr "" +msgstr "入力プールに追加のエントロピーを追加し、エントロピー・カウントを増やす。 この要求は I や I への書き込みとは異なる。 I や I への書き込みでは、 何らかのデータが追加されるだけで、 エントロピー・カウントは増やされない。 以下の構造体が使用される。" #. type: Plain text #: build/C/man4/random.4:262 @@ -10043,7 +10043,7 @@ msgid "" "Here I is the value added to (or subtracted from) the entropy " "count, and I is the buffer of size I which gets added to the " "entropy pool." -msgstr "" +msgstr "I はエントロピー・カウントに加算 (または減算) する値である。 I は大きさが I のバッファで、この内容がエントロピー・プールに追加される。" #. type: TP #: build/C/man4/random.4:271 @@ -10056,7 +10056,7 @@ msgstr "B, B" msgid "" "Zero the entropy count of all pools and add some system data (such as wall " "clock) to the pools." -msgstr "" +msgstr "すべてのプールのエントロピー・カウントを 0 にし、何らかのシステムデータ (現在の時刻など) をプールに追加する。" #. type: Plain text #: build/C/man4/random.4:277 diff --git a/po4a/stdio/po/ja.po b/po4a/stdio/po/ja.po index 85be1f5d..aad3c8b2 100644 --- a/po4a/stdio/po/ja.po +++ b/po4a/stdio/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2013-04-30 20:30+0900\n" -"PO-Revision-Date: 2013-05-05 03:30+0900\n" +"PO-Revision-Date: 2013-05-07 03:41+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -5375,16 +5375,14 @@ msgstr "" #: build/C/man2/lseek.2:90 #, no-wrap msgid "Seeking file data and holes" -msgstr "" +msgstr "ファイルのデータとホールの探索" #. type: Plain text #: build/C/man2/lseek.2:93 msgid "" "Since version 3.1, Linux supports the following additional values for " "I:" -msgstr "" -"Linux バージョン 3.1 以降では、\n" -"I に以下の値も指定することができる。" +msgstr "Linux バージョン 3.1 以降では、 I に以下の値も指定することができる。" #. type: TP #: build/C/man2/lseek.2:93 @@ -5398,7 +5396,7 @@ msgid "" "Adjust the file offset to the next location in the file greater than or " "equal to I containing data. If I points to data, then the " "file offset is set to I." -msgstr "" +msgstr "ファイルオフセットを I 以上で次にデータがある位置に設定する。 I がデータを指している場合には、 ファイルオフセットは I に設定される。" #. type: TP #: build/C/man2/lseek.2:104 @@ -5414,14 +5412,14 @@ msgid "" "offset is set to I. If there is no hole past I, then the " "file offset is adjusted to the end of the file (i.e., there is an implicit " "hole at the end of any file)." -msgstr "" +msgstr "ファイルオフセットを、 位置が I 以上の次のホール (hole) に設定する。 I がホールの内部にある場合は、ファイルシステムは I に設定される。 I 以降にホールがない場合は、 ファイルオフセットはファイル末尾に設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということだ)。" #. type: Plain text #: build/C/man2/lseek.2:124 msgid "" "In both of the above cases, B() fails if I points past the " "end of the file." -msgstr "" +msgstr "上記のどちらの場合も、 I がファイル末尾よりも先を指している場合には B() は失敗する。" #. type: Plain text #: build/C/man2/lseek.2:130 @@ -5430,7 +5428,7 @@ msgid "" "file. This can be useful for applications such as file backup tools, which " "can save space when creating backups and preserve holes, if they have a " "mechanism for discovering holes." -msgstr "" +msgstr "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割り当てられたファイルでホールをマップすることができる。 この機能はファイルバックアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあれば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節約し、ホールを保持することができる。" #. https://lkml.org/lkml/2011/4/22/79 #. http://lwn.net/Articles/440255/ @@ -5449,14 +5447,14 @@ msgid "" "B always return I (i.e., even if the location referred to " "by I is a hole, it can be considered to consist of data that is a " "sequence of zeros)." -msgstr "" +msgstr "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレージには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムにはホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みではない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列はホールとして報告されないこともある。) 最も単純な実装としては、 B は常にファイル末尾のオフセットを返すようにし、 B は常に I を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることができる (B は常に I を返すというのは、 I が参照する場所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなすということである)。" #. type: Plain text #: build/C/man2/lseek.2:162 msgid "" "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the " "definitions of B and B from Iunistd.hE>." -msgstr "" +msgstr "Iunistd.hE> から B と B の定義を得るには、 機能検査マクロ B<_GNU_SOURCE> を定義しなければならない。" #. type: Plain text #: build/C/man2/lseek.2:170 @@ -5534,7 +5532,7 @@ msgid "" "B and B are nonstandard extensions also present in " "Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the " "next POSIX revision (Issue 8)." -msgstr "" +msgstr "B と B は非標準の拡張で、 Solaris, FreeBSD, DragonFly BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されている。" #. type: Plain text #: build/C/man2/lseek.2:214 diff --git a/po4a/stdlib/po/ja.po b/po4a/stdlib/po/ja.po index 79df97dd..b9b40776 100644 --- a/po4a/stdlib/po/ja.po +++ b/po4a/stdlib/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2013-04-30 20:30+0900\n" -"PO-Revision-Date: 2013-05-03 13:02+0900\n" +"PO-Revision-Date: 2013-05-07 01:04+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -2839,7 +2839,7 @@ msgid "" "except that it returns NULL in cases where \"secure execution\" is " "required. Secure execution is required if one of the following conditions " "was true when the program run by the calling process was loaded:" -msgstr "" +msgstr "GNU 固有の B() 関数は B() と同様だが、 \"secure execution\" (「安全な実行」) が必要な場合には NULL を返す点が異なる。 \"secure execution\" が必要となるのは、 呼び出し元プロセスにより実行されるプログラムがロードされる際に、 以下の条件のいずれか一つが成立する場合である。" #. type: IP #: build/C/man3/getenv.3:69 build/C/man3/getenv.3:74 build/C/man3/getenv.3:76 @@ -2853,24 +2853,24 @@ msgid "" "the process's effective user ID did not match its real user ID or the " "process's effective group ID did not match its real group ID (typically this " "is the result of executing a set-user-ID or set-group-ID program);" -msgstr "" +msgstr "プロセスの実効ユーザ ID がプロセスの実ユーザ ID と一致しない場合、またはプロセスの実効グループ ID がプロセスの実グループ ID と一致しない場合 (通常、この状況になるのは、 set-user-ID プログラムか set-group-ID プログラムを実行した場合である)。" #. type: Plain text #: build/C/man3/getenv.3:76 msgid "the effective capability bit was set on the executable file; or" -msgstr "" +msgstr "実行ファイルで実効ケーパビリティビットがセットされている場合。" #. type: Plain text #: build/C/man3/getenv.3:78 msgid "the process has a nonempty permitted capability set." -msgstr "" +msgstr "プロセスの許可ケーパビリティセットが空でない場合。" #. type: Plain text #: build/C/man3/getenv.3:81 msgid "" "Secure execution may also required if triggered by some Linux security " "modules." -msgstr "" +msgstr "Linux セキュリティモジュールにより要求された場合にも \"secure execution\" は必要となる。" #. type: Plain text #: build/C/man3/getenv.3:88 @@ -2878,7 +2878,7 @@ msgid "" "The B() function is intended for use in general-purpose " "libraries to avoid vulnerabilities that could occur if set-user-ID or set-" "group-ID programs accidentally trusted the environment." -msgstr "" +msgstr "B() 関数は、 set-user-ID プログラムや set-group-ID プログラムが実行環境を偶然信用してしまった場合に起こり得る脆弱性を、 汎用ライブラリで回避するために使うことを意図して作られた。" #. type: Plain text #: build/C/man3/getenv.3:93 @@ -2939,7 +2939,7 @@ msgid "" "The \"secure execution\" mode of B() is controlled by the " "B flag contained in the auxiliary vector passed from the kernel " "to user space." -msgstr "" +msgstr "B() の \"secure execution\" モードは、 カーネルからユーザ空間に渡される補助ベクトル (auxiliary vector) の B フラグにより制御される。" #. type: Plain text #: build/C/man3/getenv.3:137 diff --git a/po4a/string/po/ja.po b/po4a/string/po/ja.po index 38c1d991..976a0b34 100644 --- a/po4a/string/po/ja.po +++ b/po4a/string/po/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2013-04-30 20:30+0900\n" -"PO-Revision-Date: 2013-05-04 00:20+0900\n" +"PO-Revision-Date: 2013-05-07 03:00+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -1755,7 +1755,7 @@ msgid "" "overlap, and the I string must have enough space for the result. If " "I is not large enough, program behavior is unpredictable; I." -msgstr "B() 関数は、I 文字列の後に I 文字列を付け加える。 その際に、I の最後にある終端の NULL バイト (\\(aq\\e0\\(aq) は上書きされ、新たに生成された文字列の末尾に終端の NULL バイトが付与される。 二つの文字列 I と I は重なってはならない。 また、文字列 I は、連結後の結果を格納するのに 十分な大きさでなければならない。 I が十分な大きさでない場合、プログラムがどのような動作をするか分からない。バッファオーバーランはセキュアなプログラムを攻撃する際に好んで使われる方法である。" +msgstr "B() 関数は、I 文字列の後に I 文字列を付け加える。 その際に、I の最後にある終端の NULL バイト (\\(aq\\e0\\(aq) は上書きされ、新たに生成された文字列の末尾に終端の NULL バイトが付与される。 二つの文字列 I と I は重なってはならない。 また、文字列 I は、連結後の結果を格納するのに 十分な大きさでなければならない。 I が十分な大きさでない場合、プログラムがどのような動作をするか分からない。 バッファオーバーランはセキュアなプログラムを攻撃する際に好んで使われる方法である。" #. type: Plain text #: build/C/man3/strcat.3:60 @@ -1892,7 +1892,7 @@ msgid "" "arguments before the call, or test the function return value. B() " "is not present in glibc and is not standardized by POSIX, but is available " "on Linux via the I library." -msgstr "" +msgstr "この関数は、 NULL 終端された文字列 I を文字列 I に追加する。 具体例には、 I が I より大きい場合には最大で I バイトを I からコピーし、 結果の末尾に終端の NULL バイトを追加する。 この関数では B() のバッファオーバーランが発生するという問題が修正されているが、 I が小さすぎた場合にはデータが失われる問題には、 依然として呼び出し側で対処する必要がある。 この関数は B() が作成しようとした文字列の長さを返す。 返り値が I 以上の場合、 データロスが発生している。 データロスが問題となる場合は、 呼び出し側で、 呼び出し前に引き数をチェックするか、 この関数の返り値を検査するかのいずれかをしなければならない。 B() は glibc には存在せず、 POSIX による標準化もされていないが、 Linux では I ライブラリ経由で利用できる。" #. type: Plain text #: build/C/man3/strcat.3:151 @@ -2263,7 +2263,7 @@ msgid "" "and that unused bytes in the target buffer are zeroed out (perhaps to " "prevent information leaks if the buffer is to be written to media or " "transmitted to another process via an interprocess communication technique)." -msgstr "" +msgstr "B() の正しい (かつ意図された) 用途は、 C 文字列の固定長バッファへのコピーを、 バッファがオーバーフローしないことと、 宛先バッファの未使用バイトが 0 で埋められることの両方を保証しつつ行うことである。 (宛先バッファを 0 で埋めるのは、 たいていの場合、 バッファを媒体に書き込んだり、別のプロセスにプロセス間通信を用いて送信したりした場合に情報洩れを防ぐためである)。" #. type: Plain text #: build/C/man3/strcpy.3:130 @@ -2293,7 +2293,7 @@ msgstr "" msgid "" "(Of course, the above technique ignores the fact that information contained " "in I is lost in the copying to I.)" -msgstr "" +msgstr "(もちろん、上記の方法では、 I に入っている情報が I へのコピー時に失われるという事実は無視している。)" #. type: Plain text #: build/C/man3/strcpy.3:148 @@ -2319,7 +2319,7 @@ msgid "" "check the arguments before the call, or test the function return value. " "B() is not present in glibc and is not standardized by POSIX, but " "is available on Linux via the I library." -msgstr "" +msgstr "この関数は B() と同様だが、 最大でも I バイトしか I にコピーをせず、 末尾への終端の NULL バイトの追加が必ず行われ、 宛先バッファ (の未使用部分) への NULL バイトの書き込みが行われない。 この関数では B() や B() の持つ問題のいくつかが修正されているが、 I が小さすぎた場合にはデータが失われる問題には、 依然として呼び出し側で対処する必要がある。 この関数の返り値は I の長さである。 これにより、 末尾の切り詰めが行われたかを簡単に検出することができる。 返り値が I 以上の場合には、 末尾の切り詰めが発生している。 データロスが問題となる場合は、 呼び出し側で、 呼び出し前に引き数をチェックするか、 この関数の返り値を検査するかのいずれかをしなければならない。 B() は glibc には存在せず、 POSIX による標準化もされていないが、 Linux では I ライブラリ経由で利用できる。" #. type: Plain text #: build/C/man3/strcpy.3:194 diff --git a/stats/memory b/stats/memory index 9cca5f44..29a8c9bb 100644 --- a/stats/memory +++ b/stats/memory @@ -1,15 +1,11 @@ # pagename,#complete,#remaining,#all -fallocate.2,51,4,55 madvise.2,71,11,82 mallinfo.3,48,17,65 malloc_get_state.3,18,7,25 -malloc_hook.3,42,1,43 malloc_info.3,47,10,57 -malloc_stats.3,17,2,19 malloc_trim.3,18,8,26 malloc_usable_size.3,17,5,22 mallopt.3,60,51,111 mcheck.3,29,25,54 -mmap.2,134,4,138 mtrace.3,26,11,37 subpage_prot.2,24,12,36 diff --git a/stats/special b/stats/special index e2aab8ce..691751de 100644 --- a/stats/special +++ b/stats/special @@ -3,4 +3,3 @@ cciss.4,44,44,88 cpuid.4,11,13,24 hpsa.4,34,23,57 msr.4,11,6,17 -random.4,53,7,60 diff --git a/stats/stdio b/stats/stdio index 2877a4e8..8a05026c 100644 --- a/stats/stdio +++ b/stats/stdio @@ -1,4 +1,3 @@ # pagename,#complete,#remaining,#all fopencookie.3,65,33,98 -lseek.2,53,8,61 symlink.7,20,46,66 diff --git a/stats/stdlib b/stats/stdlib index 95315c0b..7aefd0ad 100644 --- a/stats/stdlib +++ b/stats/stdlib @@ -1,3 +1,2 @@ # pagename,#complete,#remaining,#all getauxval.3,48,33,81 -getenv.3,32,7,39 diff --git a/stats/string b/stats/string index 2c104738..e69de29b 100644 --- a/stats/string +++ b/stats/string @@ -1,3 +0,0 @@ -# pagename,#complete,#remaining,#all -strcat.3,34,1,35 -strcpy.3,34,3,37 diff --git a/translation_list b/translation_list index f577edac..2e14421f 100644 --- a/translation_list +++ b/translation_list @@ -186,7 +186,7 @@ @:LDP man-pages:3.51:2013/02/12:lock:2:unimplemented:2: ○:LDP man-pages:3.51:2004/06/17:lookup_dcookie:2:2013/03/25::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI: @:LDP man-pages:3.51:2013/01/19:lremovexattr:2:removexattr:2: -☆:LDP man-pages:3.50=>3.51:2013/03/27:lseek:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: +○:LDP man-pages:3.51:2013/03/27:lseek:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: @:LDP man-pages:3.51:2013/01/19:lsetxattr:2:setxattr:2: @:LDP man-pages:3.51:2012/11/11:lstat:2:stat:2: @:LDP man-pages:3.51:2012/11/11:lstat64:2:lstat:2: @@ -201,7 +201,7 @@ ○:LDP man-pages:3.51:2012/05/04:mknodat:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: ○:LDP man-pages:3.51:2011/09/14:mlock:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: @:LDP man-pages:3.51:2011/09/14:mlockall:2:mlock:2: -☆:LDP man-pages:3.50=>3.51:2013/04/17:mmap:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: +○:LDP man-pages:3.51:2013/04/17:mmap:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: ○:LDP man-pages:3.51:2012/04/16:mmap2:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: ○:LDP man-pages:3.51:2012/07/13:modify_ldt:2:2013/03/25::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI: ○:LDP man-pages:3.51:2012/07/05:mount:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: @@ -1019,7 +1019,7 @@ @:LDP man-pages:3.51:2010/06/12:getdelim:3:getline:3: ○:LDP man-pages:3.51:2007/07/26:getdirentries:3:2013/03/25::nakano@apm.seikei.ac.jp:NAKANO Takeo: ×:LDP man-pages:3.51:2013/02/05:getdtablesize:3::::: -☆:LDP man-pages:3.41=>3.51:2012/08/14:getenv:3:2003/09/28::nakano@apm.seikei.ac.jp:NAKANO Takeo: +○:LDP man-pages:3.51:2012/08/14:getenv:3:2003/09/28::nakano@apm.seikei.ac.jp:NAKANO Takeo: ○:LDP man-pages:3.51:2002/02/28:getfsent:3:2013/03/25::nakano@apm.seikei.ac.jp:NAKANO Takeo: @:LDP man-pages:3.51:2002/02/28:getfsfile:3:getfsent:3: @:LDP man-pages:3.51:2002/02/28:getfsspec:3:getfsent:3: @@ -1310,7 +1310,7 @@ ○:LDP man-pages:3.51:2010/10/13:malloc_hook:3:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: ×:LDP man-pages:3.51:2012/04/28:malloc_info:3::::: ※:LDP man-pages:3.51:2012/05/04:malloc_set_state:3:malloc_get_state:3: -×:LDP man-pages:3.51:2012/05/06:malloc_stats:3::::: +○:LDP man-pages:3.51:2012/05/06:malloc_stats:3:2013/05/06::amotoki@gmail.com:Akihiro MOTOKI: ×:LDP man-pages:3.51:2012/03/29:malloc_trim:3::::: ×:LDP man-pages:3.51:2012/03/29:malloc_usable_size:3::::: ×:LDP man-pages:3.51:2012/04/30:mallopt:3::::: @@ -1971,7 +1971,7 @@ @:LDP man-pages:3.51:2002/10/09:ptmx:4:pts:4: ○:LDP man-pages:3.51:2002/10/09:pts:4:2013/03/26::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI: ○:LDP man-pages:3.51:1992/11/21:ram:4:2013/03/25:o:ishikawa@linux.or.jp:ISHIKAWA Mutsumi: -☆:LDP man-pages:3.50=>3.51:2013/03/15:random:4:2013/03/26::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI: +○:LDP man-pages:3.51:2013/03/15:random:4:2013/03/26::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI: ○:LDP man-pages:3.51:2010/02/25:rtc:4:2013/03/26::ysato444@yahoo.co.jp:Yuichi SATO: ○:LDP man-pages:3.51:2012/05/03:sd:4:2013/03/26::amotoki@gmail.com:Akihiro MOTOKI: ○:LDP man-pages:3.51:2012/08/05:sk98lin:4:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI: diff --git a/untrans.html b/untrans.html index 96fb8e03..d4a0ebff 100644 --- a/untrans.html +++ b/untrans.html @@ -36,18 +36,14 @@ ptrace.2218/27821.58 quotactl.255/10246.08 memory -fallocate.24/5592.73 madvise.211/8286.59 mallinfo.317/6573.85 malloc_get_state.37/2572.00 -malloc_hook.31/4397.67 malloc_info.310/5782.46 -malloc_stats.32/1989.47 malloc_trim.38/2669.23 malloc_usable_size.35/2277.27 mallopt.351/11154.05 mcheck.325/5453.70 -mmap.24/13897.10 mtrace.311/3770.27 subpage_prot.212/3666.67 net @@ -82,21 +78,15 @@ cpuid.413/2445.83 hpsa.423/5759.65 msr.46/1764.71 -random.47/6088.33 stdio fopencookie.333/9866.33 -lseek.28/6186.89 symlink.746/6630.30 stdlib getauxval.333/8159.26 -getenv.37/3982.05 -string -strcat.31/3597.14 -strcpy.33/3791.89 time clock_getcpuclockid.39/4479.55 utimensat.250/10753.27 zdump.81/2295.45 -Total 67 pages +Total 58 pages -- 2.11.0