home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Xau(3) Xau(3)
-
-
- NNAAMMEE
- Xau library: XauFileName, XauReadAuth, XauLockAuth, XauUn-
- lockAuth, XauWriteAuth, XauDisposeAuth, XauGetAuthByAddr,
- XauGetBestAuthByAddr - X authority database routines
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<XX1111//XXaauutthh..hh>>
-
- 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;
-
- cchhaarr **XXaauuFFiilleeNNaammee (())
-
- XXaauutthh **XXaauuRReeaaddAAuutthh ((aauutthh__ffiillee))
- _F_I_L_E _*_a_u_t_h___f_i_l_e_;
-
- iinntt XXaauuWWrriitteeAAuutthh ((aauutthh__ffiillee,, aauutthh))
- _F_I_L_E _*_a_u_t_h___f_i_l_e_;
- _X_a_u_t_h _*_a_u_t_h_;
-
- XXaauutthh **XXaauuGGeettAAuutthhBByyAAddddrr ((ffaammiillyy,,
- aaddddrreessss__lleennggtthh,, aaddddrreessss,,
- nnuummbbeerr__lleennggtthh,, nnuummbbeerr))
- _u_n_s_i_g_n_e_d _s_h_o_r_t _f_a_m_i_l_y_;
- _u_n_s_i_g_n_e_d _s_h_o_r_t _a_d_d_r_e_s_s___l_e_n_g_t_h_;
- _c_h_a_r _*_a_d_d_r_e_s_s_;
- _u_n_s_i_g_n_e_d _s_h_o_r_t _n_u_m_b_e_r___l_e_n_g_t_h_;
- _c_h_a_r _*_n_u_m_b_e_r_;
-
- XXaauutthh **XXaauuGGeettBBeessttAAuutthhBByyAAddddrr ((ffaammiillyy,,
- aaddddrreessss__lleennggtthh,, aaddddrreessss,,
- nnuummbbeerr__lleennggtthh,, nnuummbbeerr,,
- ttyyppeess__lleennggtthh,, ttyyppeess,, ttyyppee__lleennggtthhss))
- _u_n_s_i_g_n_e_d _s_h_o_r_t _f_a_m_i_l_y_;
- _u_n_s_i_g_n_e_d _s_h_o_r_t _a_d_d_r_e_s_s___l_e_n_g_t_h_;
- _c_h_a_r _*_a_d_d_r_e_s_s_;
- _u_n_s_i_g_n_e_d _s_h_o_r_t _n_u_m_b_e_r___l_e_n_g_t_h_;
- _c_h_a_r _*_n_u_m_b_e_r_;
- _i_n_t _t_y_p_e_s___l_e_n_g_t_h_;
- _c_h_a_r _*_*_t_y_p_e_s_;
- _i_n_t _*_t_y_p_e___l_e_n_g_t_h_s_;
-
- iinntt XXaauuLLoocckkAAuutthh ((ffiillee__nnaammee,, rreettrriieess,, ttiimmeeoouutt,, ddeeaadd))
- _c_h_a_r _*_f_i_l_e___n_a_m_e_;
- _i_n_t _r_e_t_r_i_e_s_;
-
-
-
- X Version 11 Release 6.1 1
-
-
-
-
-
- Xau(3) Xau(3)
-
-
- _i_n_t _t_i_m_e_o_u_t_;
- _l_o_n_g _d_e_a_d_;
-
- iinntt XXaauuUUnnlloocckkAAuutthh ((ffiillee__nnaammee))
- _c_h_a_r _*_f_i_l_e___n_a_m_e_;
-
- XXaauuDDiissppoosseeAAuutthh ((aauutthh))
- _X_a_u_t_h _*_a_u_t_h_;
-
-
- DDEESSCCRRIIPPTTIIOONN
- XXaauuFFiilleeNNaammee 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.
-
- XXaauuRReeaaddAAuutthh reads the next entry from _a_u_t_h___f_i_l_e. The
- entry is nnoott statically allocated and should be freed by
- calling _X_a_u_D_i_s_p_o_s_e_A_u_t_h.
-
- XXuuWWrriitteeAAuutthh writes an authorization entry to _a_u_t_h___f_i_l_e.
- It returns 1 on success, 0 on failure.
-
- XXaauuGGeettAAuutthhBByyAAddddrr searches for an entry which matches the
- given network address/display number pair. The entry is
- nnoott statically allocated and should be freed by calling
- _X_a_u_D_i_s_p_o_s_e_A_u_t_h.
-
- XXaauuGGeettBBeessttAAuutthhBByyAAddddrr is similar to XXaauuGGeettAAuutthhBByyAAddddrr,
- except that a list of acceptable authentication methods is
- specified. Xau will choose the file entry which matches
- the earliest entry in this list (e.g., the most secure
- authentication method). The _t_y_p_e_s argument is an array of
- strings, one string for each authentication method.
- _t_y_p_e_s___l_e_n_g_t_h specifies how many elements are in the _t_y_p_e_s
- array. _t_y_p_e_s___l_e_n_g_t_h_s is an array of integers representing
- the length of each string.
-
- XXaauuLLoocckkAAuutthh does the work necessary to synchronously
- update an authorization file. First it makes two file
- names, one with ``-c'' appended to _f_i_l_e___n_a_m_e, the other
- with ``-l'' appended. If the ``-c'' file already exists
- and is more than _d_e_a_d seconds old, _X_a_u_L_o_c_k_A_u_t_h removes it
- and the associated ``-l'' file. To prevent possible syn-
- chronization troubles with NFS, a _d_e_a_d value of zero
- forces the files to be removed. _X_a_u_L_o_c_k_A_u_t_h makes _r_e_t_r_i_e_s
- attempts to create and link the file names, pausing _t_i_m_e_-
- _o_u_t seconds between each attempt. _X_a_u_L_o_c_k_A_u_t_h returns a
- collection of values depending on the results:
-
- LOCK_ERROR A system error occurred, either a file_name
- which is too long, or an unexpected failure from
- a system call. errno may prove useful.
-
-
-
-
- X Version 11 Release 6.1 2
-
-
-
-
-
- Xau(3) Xau(3)
-
-
- LOCK_TIMEOUT _r_e_t_r_i_e_s attempts failed
-
- LOCK_SUCCESS The lock succeeded.
-
-
- XXaauuUUnnlloocckkAAuutthh undoes the work of _X_a_u_L_o_c_k_A_u_t_h by unlinking
- both the ``-c'' and ``-l'' file names.
-
- XXaauuDDiissppoosseeAAuutthh frees storage allocated to hold an autho-
- rization entry.
-
- SSEEEE AALLSSOO
- xauth(1), xdm(1)
-
- AAUUTTHHOORR
- Keith Packard, MIT X Consortium
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- X Version 11 Release 6.1 3
-
-
-