Patches from pkgsrc-WIP
[oweals/cde.git] / cde / programs / dtlogin / bls / bls.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /*
24  * xdm - display manager daemon
25  *
26  * $XConsortium: bls.h /main/4 1996/10/30 11:35:48 drk $
27  *
28  * Copyright 1988 Massachusetts Institute of Technology
29  *
30  * Permission to use, copy, modify, and distribute this software and its
31  * documentation for any purpose and without fee is hereby granted, provided
32  * that the above copyright notice appear in all copies and that both that
33  * copyright notice and this permission notice appear in supporting
34  * documentation, and that the name of M.I.T. not be used in advertising or
35  * publicity pertaining to distribution of the software without specific,
36  * written prior permission.  M.I.T. makes no representations about the
37  * suitability of this software for any purpose.  It is provided "as is"
38  * without express or implied warranty.
39  *
40  * Author:  Keith Packard, MIT X Consortium
41  */
42
43 /*
44  * bls.h
45  *
46  * public interfaces for B1 greet/verify functionality
47  */
48
49
50 #ifndef _BLS_H
51 #define _BLS_H
52
53 typedef unsigned char BOOL;
54
55 #ifndef FALSE
56 #define FALSE   0
57 #endif
58
59 #ifndef TRUE
60 #define TRUE    1
61 #endif
62
63 #ifdef BLS
64 #include <sys/security.h>
65 #include <sys/audit.h>     /* for passwd and pr_passwd */
66 #endif
67
68 #ifdef pegasus
69 #undef dirty            /* Some bozo put a macro called dirty in sys/param.h */
70 #endif /* pegasus */
71
72 struct greet_info {
73         char            *name;          /* user name */
74         char            *password;      /* user password */
75 #ifdef BLS
76         char            *b1security;    /* user's b1 security */
77 #endif
78         char            *string;        /* random string */
79 };
80                                 
81 struct verify_info {
82         int             uid;            /* user id */
83 #ifdef NGROUPS
84         int             groups[NGROUPS];/* group list */
85         int             ngroups;        /* number of elements in groups */
86 #else
87         int             gid;            /* group id */
88 #endif
89         char            **argv;         /* arguments to session */
90         char            **userEnviron;  /* environment for session */
91         char            **systemEnviron;/* environment for startup/reset */
92 #ifdef BLS
93         char *user_name;
94         struct mand_ir_t *sec_label_ir;
95         struct mand_ir_t *clearance_ir;
96         /* save these for logout time */
97         struct pr_passwd *prpwd;
98         struct passwd *pwd;
99         char terminal[16];
100 #endif
101 };
102
103 /***************************************************************************
104  *
105  *  Global variables
106  *
107  ***************************************************************************/
108 extern struct pr_passwd         *b1_pwd;
109 extern struct verify_info       *verify;        
110 extern struct greet_info        *greet; 
111
112 #endif  /* _BLS_H */