2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $TOG: mp_auth_functions.h /main/1 1999/08/30 10:55:06 mgreess $ */
24 /******************************************************************************
27 Copyright 1993, 1998 The Open Group
31 The above copyright notice and this permission notice shall be included in
32 all copies or substantial portions of the Software.
34 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
38 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
39 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41 Except as contained in this notice, the name of The Open Group shall not be
42 used in advertising or otherwise to promote the sale, use or other dealings
43 in this Software without prior written authorization from The Open Group.
45 Author: Ralph Mor, X Consortium
46 ******************************************************************************/
48 * This file was copied and altered from libICE/ICEutil.h
49 * The 'Ice' prefix has been replaced by tt_ for functions
50 * and by _tt_ for data types.
53 #ifndef MP_AUTH_FUNCTIONS_H
54 #define MP_AUTH_FUNCTIONS_H
59 * Data structure for entry in ICE authority file
62 typedef struct _tt_AuthFileEntry {
64 unsigned short protocol_data_length;
68 unsigned short auth_data_length;
72 typedef struct _tt_AuthFileEntryList {
73 struct _tt_AuthFileEntryList *next;
74 _tt_AuthFileEntry *entry;
75 } _tt_AuthFileEntryList;
78 * Authentication data maintained in memory.
85 unsigned short auth_data_length;
90 * Return values from tt_LockAuthFile
93 #define _tt_AuthLockSuccess 0 /* lock succeeded */
94 #define _tt_AuthLockError 1 /* lock unexpectely failed, check errno */
95 #define _tt_AuthLockTimeout 2 /* lock failed, timeouts expired */
102 extern char *_tt_AuthFileName (void);
104 extern int _tt_LockAuthFile (
105 char * /* file_name */,
111 extern void _tt_UnlockAuthFile (
112 char * /* file_name */
115 extern _tt_AuthFileEntry *_tt_ReadAuthFileEntry (
116 FILE * /* auth_file */
119 extern void _tt_FreeAuthFileEntry (
120 _tt_AuthFileEntry * /* auth */
123 extern int _tt_WriteAuthFileEntry (
124 FILE * /* auth_file */,
125 _tt_AuthFileEntry * /* auth */
128 extern _tt_AuthFileEntry *_tt_GetAuthFileEntry (
129 char * /* protocol_name */,
130 char * /* network_id */,
131 char * /* auth_name */
134 extern char *_tt_GenerateMagicCookie (
139 #endif /* MP_AUTH_FUNCTIONS_H */