24 * shall not be used in advertising or otherwise to promote the sale, use |
24 * shall not be used in advertising or otherwise to promote the sale, use |
25 * or other dealings in this Software without prior written authorization |
25 * or other dealings in this Software without prior written authorization |
26 * of the copyright holder. |
26 * of the copyright holder. |
27 */ |
27 */ |
28 |
28 |
29 #pragma ident "@(#)tsolinfo.h 1.11 06/03/07 SMI" |
29 #pragma ident "@(#)tsolinfo.h 1.14 06/05/25 SMI" |
30 |
30 |
31 |
31 |
32 #ifndef _TSOL_INFO_H |
32 #ifndef _TSOL_INFO_H |
33 #define _TSOL_INFO_H |
33 #define _TSOL_INFO_H |
34 |
34 |
41 #include <tsol/label.h> |
41 #include <tsol/label.h> |
42 #include <sys/tsol/tndb.h> |
42 #include <sys/tsol/tndb.h> |
43 #include <bsm/audit.h> |
43 #include <bsm/audit.h> |
44 #include <sys/mkdev.h> |
44 #include <sys/mkdev.h> |
45 #include <ucred.h> |
45 #include <ucred.h> |
46 #include "tsolpriv.h" |
|
47 #include "misc.h" |
46 #include "misc.h" |
48 #include "dixstruct.h" |
47 #include "dixstruct.h" |
49 #include "keysym.h" |
48 #include "keysym.h" |
50 |
49 |
51 /********************************* |
50 /********************************* |
158 (tsolinfo->forced_trust == 1)) |
157 (tsolinfo->forced_trust == 1)) |
159 |
158 |
160 #define XTSOLTrusted(pWin)\ |
159 #define XTSOLTrusted(pWin)\ |
161 (((TsolResPtr)(pWin->devPrivates[tsolWindowPrivateIndex].ptr))->flags & TRUSTED_MASK) |
160 (((TsolResPtr)(pWin->devPrivates[tsolWindowPrivateIndex].ptr))->flags & TRUSTED_MASK) |
162 |
161 |
163 /* |
|
164 * win_selection can be a process attribute or a priv |
|
165 */ |
|
166 #define HasWinSelection(tsolinfo)\ |
|
167 (priv_test((tsolinfo->privs), PRIV_WIN_SELECTION)) |
|
168 |
|
169 |
162 |
170 /********************************* |
163 /********************************* |
171 * |
164 * |
172 * DATA STRUCTURES |
165 * DATA STRUCTURES |
173 * |
166 * |
190 gid_t egid; /* effective group id */ |
183 gid_t egid; /* effective group id */ |
191 pid_t pid; /* process id */ |
184 pid_t pid; /* process id */ |
192 zoneid_t zid; /* zone id */ |
185 zoneid_t zid; /* zone id */ |
193 priv_set_t *privs; /* privileges */ |
186 priv_set_t *privs; /* privileges */ |
194 bslabel_t *sl; /* sensitivity label */ |
187 bslabel_t *sl; /* sensitivity label */ |
195 u_long sid; /* session id */ |
|
196 u_long iaddr; /* internet addr */ |
188 u_long iaddr; /* internet addr */ |
197 Bool trusted_path; /* has trusted path */ |
189 Bool trusted_path; /* has trusted path */ |
198 Bool priv_debug; /* do privilege debugging */ |
190 Bool priv_debug; /* do privilege debugging */ |
199 u_long flags; /* various flags */ |
191 u_long flags; /* various flags */ |
200 int forced_trust; /* client masked as trusted */ |
192 int forced_trust; /* client masked as trusted */ |
201 struct auditinfo_addr auinfo; /* audit addr */ |
|
202 au_id_t auid; /* audit id */ |
193 au_id_t auid; /* audit id */ |
203 au_tid_addr_t tid; /* terminal id */ |
194 au_mask_t amask; /* audit mask */ |
204 auditinfo_t aw_auinfo; /* audit info */ |
195 au_asid_t asid; /* audit session id */ |
205 client_type_t client_type; /* Local or Remote client */ |
196 client_type_t client_type; /* Local or Remote client */ |
|
197 int asaverd; |
|
198 struct sockaddr_storage saddr; /* socket information */ |
206 } TsolInfoRec, *TsolInfoPtr; |
199 } TsolInfoRec, *TsolInfoPtr; |
207 |
200 |
208 /* |
201 /* |
209 * per resource info |
202 * per resource info |
210 */ |
203 */ |
358 extern int PolySelection(Atom atom); |
351 extern int PolySelection(Atom atom); |
359 extern TsolPolyInstInfoRec tsolpolyinstinfo; |
352 extern TsolPolyInstInfoRec tsolpolyinstinfo; |
360 extern int tsolWindowPrivateIndex; |
353 extern int tsolWindowPrivateIndex; |
361 extern int tsolPixmapPrivateIndex; |
354 extern int tsolPixmapPrivateIndex; |
362 extern uid_t OwnerUID; /* Workstation owner uid */ |
355 extern uid_t OwnerUID; /* Workstation owner uid */ |
363 |
356 extern Bool system_audit_on; |
364 |
357 |
365 /********************************* |
358 /********************************* |
366 * |
359 * |
367 * FUNCTION PROTOTYPES |
360 * FUNCTION PROTOTYPES |
368 * |
361 * |
373 extern WindowPtr TopClientWin(WindowPtr pWin); |
366 extern WindowPtr TopClientWin(WindowPtr pWin); |
374 extern WindowPtr RootWin(WindowPtr pWin); |
367 extern WindowPtr RootWin(WindowPtr pWin); |
375 extern WindowPtr XYToWin(int x, int y); /* Defined in events.c */ |
368 extern WindowPtr XYToWin(int x, int y); /* Defined in events.c */ |
376 extern Window RootOf(WindowPtr pWin); |
369 extern Window RootOf(WindowPtr pWin); |
377 extern Window RootOfClient(WindowPtr pWin); |
370 extern Window RootOfClient(WindowPtr pWin); |
|
371 extern int TsolDisabledExtension(char *extname, int extlen); |
|
372 extern int MatchTsolConfig(char *name, int len); |
|
373 extern int HasWinSelection(TsolInfoPtr tsolinfo); |
|
374 extern int same_client (ClientPtr client, XID xid); |
|
375 extern int client_private (ClientPtr client, XID xid); |
|
376 extern TsolPropPtr AllocTsolProp(); |
|
377 extern bslabel_t *lookupSL_low(); |
|
378 extern bslabel_t *lookupSL(bslabel_t *slptr); |
|
379 extern BoxPtr WindowExtents(WindowPtr pWin, BoxPtr pBox); |
|
380 extern Bool ShapeOverlap(WindowPtr pWin, BoxPtr pWinBox, |
|
381 WindowPtr pSib, BoxPtr pSibBox); |
378 |
382 |
379 |
383 |
380 #ifdef __cplusplus |
384 #ifdef __cplusplus |
381 } |
385 } |
382 #endif |
386 #endif |