X Version 11, Release 6
Copyright © 1988, X Consortium.
Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. MIT makes no representations about the suitability for any purpose of the information in this document. This documentation is provided "as is" without express or implied warranty.
The use the functions defined in this section, you should include the header file <
X11/Xauth.h >.
char *XauFileName ()
XauFileName generates the default authorization file name by first checking the
XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is
statically allocated and should not be freed.
auth_file | specifies authorization file |
XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.
auth_file | specifies the authorization file |
auth | specifies the authorization entry |
XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.
family | specifies the family |
address_length | specifies the network address length |
address | specifies the network address |
number_length | specifies the display number length |
number | specifies the display number |
name_length | specifies the authorization name length |
name | specifies the authorization name |
XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth
file_name | specifies the authorization file name |
retries | specifies the number of retry times |
timeout | specifies the time between each attempt |
dead | specifies the time. The lock file being more than dead second, is removed. |
XauLockAuth does the work necessary to synchronously update an authorization file. First it makes to file names, one with "-c" appended to file_name, the other with "-1" appended. If the "-c" file already exists and is more than dead seconds old, XauLockAuth removes it and the associated "-1" file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth retums a collection of values depending on the results.
file_name | specifies the authorization file name |
XauUnlockAuth undoes the work of XauLockAuth by unlinking both the "-c" and "-1" file names.
auth | specifies the authorization entry |
XauDisposeAuth frees storage allocated to hold an authorization entry.
Home |
---|
Contents | Previous Chapter | Next Chapter |