.\" $Xorg: Xau.man,v 1.3 2000/08/17 19:41:54 cpqbld Exp $ .\" Copyright (c) 1994 X Consortium .\" .\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the "Software"), .\" to deal in the Software without restriction, including without limitation .\" the rights to use, copy, modify, merge, publish, distribute, sublicense, .\" and/or sell copies of the Software, and to permit persons to whom the .\" Software furnished to do so, subject to the following conditions: .\" .\" The above copyright notice and this permission notice shall be included in .\" all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL .\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, .\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF .\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE .\" SOFTWARE. .\" .\" Except as contained in this notice, the name of the X Consortium shall not .\" be used in advertising or otherwise to promote the sale, use or other .\" dealing in this Software without prior written authorization from the .\" X Consortium. .\" .\" Copyright (c) 1998, 2001 The X Japanese Documentation Project. .\" .\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, dis- .\" tribute, sublicense, and/or sell copies of the Software, and to permit .\" persons to whom the Software is furnished to do so, subject to the fol- .\" lowing conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- .\" ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT .\" SHALL THE X JAPANESE DOCUMENTATION PROJECT BE LIABLE FOR ANY CLAIM, .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of The X Japanese .\" Documentation Project shall not be used in advertising or otherwise to .\" promote the sale, use or other dealings in this Software without prior .\" written authorization from The X Japanese Documentation Project. .\" .\" X Window System is a trademark of The Open Group. .\" .\" Translated Tue Oct 27 00:00:00 JST 1998 .\" by FUJIWARA Teruyoshi .\" Updated Mon Oct 8 23:58:52 JST 2001 for XFree86 4.1.0 .\" by FUJIWARA Teruyoshi .\" .\" $XFree86: xc/doc/man/Xau/Xau.man,v 1.2 2001/01/27 18:20:19 dawes Exp $ .\" .TH Xau 3 "Release 6.5" "X Version 11" .SH 名前 Xau library: XauFileName, XauReadAuth, XauLockAuth, XauUnlockAuth, XauWriteAuth, XauDisposeAuth, .\"0 XauGetAuthByAddr, XauGetBestAuthByAddr \- X authority database routines XauGetAuthByAddr, XauGetBestAuthByAddr \- X 認証データベースルーチン .SH 書式 .B "#include " .PP .nf .ta .5i 2i typedef struct xauth { unsigned short family; unsigned short address_length; char *address; unsigned short number_length; char *number; unsigned short name_length; char *name; unsigned short data_length; char *data; } Xauth; .ft B char *XauFileName () .ft B Xauth *XauReadAuth (auth_file) .ft I FILE *auth_file; .ft B int XauWriteAuth (auth_file, auth) .ft I FILE *auth_file; Xauth *auth; .ft B Xauth *XauGetAuthByAddr (\kAfamily, \h'|\nAu'address_length, address, \h'|\nAu'number_length, number) .ft I unsigned short family; unsigned short address_length; char *address; unsigned short number_length; char *number; .ft B Xauth *XauGetBestAuthByAddr (\kAfamily, \h'|\nAu'address_length, address, \h'|\nAu'number_length, number, \h'|\nAu'types_length, types, type_lengths) .ft I unsigned short family; unsigned short address_length; char *address; unsigned short number_length; char *number; int types_length; char **types; int *type_lengths; .ft B int XauLockAuth (file_name, retries, timeout, dead) .ft I char *file_name; int retries; int timeout; long dead; .ft B int XauUnlockAuth (file_name) .ft I char *file_name; .ft B XauDisposeAuth (auth) .ft I Xauth *auth; .ft R .SH 説明 .PP .\"0 \fBXauFileName\fP generates the default authorization file name by first .\"0 checking the XAUTHORITY environment variable if set, else it returns .\"0 $HOME/.Xauthority. This name is statically allocated and should .\"0 not be freed. \fBXauFileName\fP はデフォルトの認証ファイル名を生成する。 まず最初に環境変数 XAUTHORITY がセットされていればこれを調べ、なければ $HOME/.Xauthority を返す。この名前は静的に割り当てられているので、解 放してはならない。 .PP .\"0 \fBXauReadAuth\fP reads the next entry from \fIauth_file\fP. The entry is .\"0 \fBnot\fP statically allocated and should be freed by calling .\"0 \fIXauDisposeAuth\fP. \fBXauReadAuth\fP は \fIauth_file\fP から次のエントリを取得する。 エントリは静的には割り当てられて\fBいない\fPので、\fIXauDisposeAuth\fP を呼び出して解放しなければならない。 .PP .\"0 \fBXuWriteAuth\fP writes an authorization entry to \fIauth_file\fP. It .\"0 returns 1 on success, 0 on failure. \fBXuWriteAuth\fP は認証エントリを \fIauth_file\fP に書き出す。 この関数は成功時には1を、失敗時には0を返す。 .PP .\"0 \fBXauGetAuthByAddr\fP searches for an entry which matches the given network .\"0 address/display number pair. The entry is \fBnot\fP statically allocated .\"0 and should be freed by calling \fIXauDisposeAuth\fP. \fBXauGetAuthByAddr\fP は与えられた ネットワークアドレス/ディスプレイ番号のペアに一致するエントリを検索する。 エントリは静的に\fB割り当てられない\fPので、\fIXauDisposeAuth\fP を呼んで 解放しなければならない。 .PP .\"0 \fBXauGetBestAuthByAddr\fP is similar to \fBXauGetAuthByAddr\fP, except .\"0 that a list of acceptable authentication methods is specified. Xau will .\"0 choose the file entry which matches the earliest entry in this list (e.g., the .\"0 most secure authentication method). The \fItypes\fP argument is an array of .\"0 strings, one string for each authentication method. \fItypes_length\fP .\"0 specifies how many elements are in the \fItypes\fP array. \fBXauGetBestAuthByAddr\fP は、許される認証方法のリストが指定される点 が異なる点を除き、 \fBXauGetAuthByAddr\fP とほぼ同じである。Xau は、こ のリスト中で最も早いエントリに一致したファイルエントリを選択する(例え ば、最も安全な認証方法)。引き数 \fItypes\fP は文字列の配列であり、一つの 文字列がそれぞれの認証方法に対応する。\fItypes_length\fP は、配列 \fItypes\fP にいくつ要素があるかを指定する。 .\"0 \fItypes_lengths\fP is an array of integers representing the length .\"0 of each string. \fItypes_lengths\fP はそれぞれの文字列の長さを表す整数の配列である。 .PP .\"0 \fBXauLockAuth\fP does the work necessary to synchronously update an .\"0 authorization file. First it makes two file names, one with ``-c'' appended .\"0 to \fIfile_name\fP, the other with ``-l'' appended. If the ``-c'' file .\"0 already exists and is more than \fIdead\fP seconds old, \fIXauLockAuth\fP .\"0 removes it and the associated ``-l'' file. To prevent possible .\"0 synchronization troubles with NFS, a \fIdead\fP value of zero forces the .\"0 files to be removed. \fIXauLockAuth\fP makes \fIretries\fP attempts to .\"0 create and link the file names, pausing \fItimeout\fP seconds between each .\"0 attempt. \fIXauLockAuth\fP returns a collection of values depending on the .\"0 results: \fBXauLockAuth\fP は、認証ファイルを同期して更新するために必要な仕事を 行う。この関数はまず2つのファイル名を生成する。1つは \fIfile_name\fP に ``-c'' を追加したものであり、もう1つは ``-l'' を追加したものである。 もし ``-c'' が追加されたファイルが存在し、これが \fIdead\fP 秒以上古い 場合には、\fIXauLockAuth\fP はこのファイルとこれに対応する ``-l'' が追 加されたファイルを削除する。NFS による同期の問題を避けるため、 \fIdead\fP の値が 0 ならばファイルを削除する。\fIXauLockAuth\fP は ファイル名の生成とリンク作成を \fIretries\fP 回試みる。この試行の間に は \fItimeout\fP 秒休止する。\fIXauLockAuth\fP は結果によって決まる値 の集合を返す。 .nf .ta .5i 2i .\"0 LOCK_ERROR A system error occurred, either a file_name .\"0 which is too long, or an unexpected failure from .\"0 a system call. errno may prove useful. LOCK_ERROR システムエラーが発生した。ファイル名が長すぎる か、システムコールが予期しない失敗をした。errno が役に 立つと思われる。 .\"0 LOCK_TIMEOUT \fIretries\fP attempts failed LOCK_TIMEOUT \fIretries\fP 回試みが失敗した .\"0 LOCK_SUCCESS The lock succeeded. LOCK_SUCCESS ロックに成功した。 .fi .PP .\"0 \fBXauUnlockAuth\fP undoes the work of \fIXauLockAuth\fP by unlinking both .\"0 the ``-c'' and ``-l'' file names. \fBXauUnlockAuth\fP は、``-c'' と ``-l'' が加えられたファイル名を両方 削除することにより、 \fIXauLockAuth\fP の結果を取り消す。 .PP .\"0 \fBXauDisposeAuth\fP frees storage allocated to hold an authorization entry. \fBXauDisposeAuth\fP は、認証エントリを格納している、割り当てられた メモリを解放する。 .SH 関連項目 xauth(1), xdm(1) .SH 著者 Keith Packard, MIT X Consortium