JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Trusted Extensions Developer's Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Trusted Extensions APIs and Security Policy

2.  Labels and Clearances

3.  Label Code Examples

4.  Interprocess Communications

5.  Trusted X Window System

Trusted X Window System Environment

Trusted X Window System Security Attributes

Trusted X Window System Security Policy

Root Window

Client Windows

Override-Redirect Windows

Keyboard, Pointer, and Server Control

Selection Manager

Default Window Resources

Moving Data Between Windows

Privileged Operations and the Trusted X Window System

Trusted Extensions X Window System APIs

Data Types for X11

Accessing Attributes

Accessing and Setting a Window Label

Accessing and Setting a Window User ID

Accessing and Setting a Window Property Label

Accessing and Setting a Window Property User ID

Accessing and Setting a Workstation Owner ID

Setting the X Window Server Clearance and Minimum Label

Working With the Trusted Path Window

Accessing and Setting the Screen Stripe Height

Setting Window Polyinstantiation Information

Working With the X11 Label-Clipping Interface

Using Trusted X Window System Interfaces

Obtaining Window Attributes

Translating the Window Label With the Font List

Obtaining a Window Label

Setting a Window Label

Obtaining the Window User ID

Obtaining the X Window Server Workstation Owner ID

6.  Label Builder GUI

7.  Trusted Web Guard Prototype

8.  Experimental Java Bindings for the Solaris Trusted Extensions Label APIs

A.  Programmer's Reference

B.  Trusted Extensions API Reference

Index

Trusted Extensions X Window System APIs

To use the Trusted X11 APIs, you need the following header file:

#include <X11/extensions/Xtsol.h>

The Trusted X11 examples compile with the -lXtsol and -ltsol library options.

To use the X11 label-clipping APIs, you need the following header file:

#include <tsol/label.h>

The label-clipping examples compile with the -ltsol library option.

The following sections provide data types and declarations for the Trusted X11 interfaces and the X11 label-clipping interfaces:

Data Types for X11

The following data types are defined in X11/extensions/Xtsol.h and are used for the Trusted Extensions X Window System APIs:

Accessing Attributes

The following routines are used to access resource, property, and client attributes:

Status XTSOLgetResAttributes(Display *display, XID object, ResourceType type, XTSOLResAttributes *winattrp);

This routine returns the resource attributes for a window ID in winattrp. See the XTSOLgetResAttributes(3XTSOL) man page.

Status XTSOLgetPropAttributes(Display *display, Window window, Atom property, XTSOLPropAttributes *propattrp);

This routine returns the property attributes for a property hanging on a window ID in propattrp. See the XTSOLgetPropAttributes(3XTSOL) man page.

Status XTSOLgetClientAttributes(Display *display, XID windowid, XTsolClientAttributes *clientattrp);

This routine returns the client attributes in clientattrp. See the XTSOLgetClientAttributes(3XTSOL) man page.

Accessing and Setting a Window Label

The XTSOLgetResLabel() and XTSOLsetResLabel() routines are used to obtain and set the sensitivity label of a window.

Status XTSOLgetResLabel(Display *display, XID object, ResourceType type, m_label_t *sl);

This routine obtains the sensitivity label of a window. See the XTSOLgetResLabel(3XTSOL) man page.

Status XTSOLsetResLabel(Display *display, XID object, ResourceType type, m_label_t *sl);

This routine sets the sensitivity label of a window. See the XTSOLsetResLabel(3XTSOL) man page.

Accessing and Setting a Window User ID

The XTSOLgetResUID() and XTSOLsetResUID() routines are used to obtain and set the user ID of a window.

Status XTSOLgetResUID(Display *display, XID object, ResourceType type, uid_t *uidp);

This routine obtains the user ID of a window. See the XTSOLgetResUID(3XTSOL) man page.

Status XTSOLsetResUID(Display *display, XID object, ResourceType type, uid_t *uidp);

This routine sets the user ID of a window. See the XTSOLsetResUID(3XTSOL) man page.

Accessing and Setting a Window Property Label

The XTSOLgetPropLabel() and XTSOLsetPropLabel() routines are used to obtain and set the sensitivity label of a property hanging on a window ID.

Status XTSOLgetPropLabel(Display *display, Window window, Atom property, m_label_t *sl);

This routine obtains the sensitivity label of a property hanging on a window ID. See the XTSOLgetPropLabel(3XTSOL) man page.

Status XTSOLsetPropLabel(Display *display, Window window, Atom property, m_label_t *sl);

This routine sets the sensitivity label of a property hanging on a window ID. See the XTSOLsetPropLabel(3XTSOL) man page.

Accessing and Setting a Window Property User ID

The XTSOLgetPropUID() and XTSOLsetPropUID() routines are used to obtain and set the user ID of a property hanging on a window ID.

Status XTSOLgetPropUID(Display *display, Window window, Atom property, uid_t *uidp);

This routine obtains the user ID of a property hanging on a window ID. See the XTSOLgetPropUID(3XTSOL) man page.

Status XTSOLsetPropUID(Display *display, Window window, Atom property, uid_t *uidp);

This routine sets the user ID of a property hanging on a window ID. See the XTSOLsetPropUID(3XTSOL) man page.

Accessing and Setting a Workstation Owner ID

The XTSOLgetWorkstationOwner() and XTSOLsetWorkstationOwner() routines are used to obtain and set the user ID of the owner of the workstation server.


Note - The XTSOLsetWorkstationOwner() routine should only be used by the window manager.


Status XTSOLgetWorkstationOwner(Display *display, uid_t *uidp);

This routine obtains the user ID of the owner of the workstation server. See the XTSOLgetWorkstationOwner(3XTSOL) man page

Status XTSOLsetWorkstationOwner(Display *display, uid_t *uidp);

This routine sets the user ID of the owner of the workstation server. See the XTSOLsetWorkstationOwner(3XTSOL) man page.

Setting the X Window Server Clearance and Minimum Label

The XTSOLsetSessionHI() and XTSOLsetSessionLO() routines are used to set the session high clearance and the session low minimum label for the X Window Server. Session high must be within the user's range. Session low is the same as the user's minimum label for the multilevel session.


Note - These interfaces should only be used by the window manager.


Status XTSOLsetSessionHI(Display *display, m_label_t *sl);

The session high clearance is set from the workstation owner's clearance at login. The session high clearance must be dominated by the owner's clearance and by the upper bound of the machine monitor's label range. Once changed, connection requests from clients that run at a sensitivity label higher than the window server clearance are rejected unless they have privileges. See the XTSOLsetSessionHI(3XTSOL) man page.

Status XTSOLsetSessionLO(Display *display, m_label_t *sl);

The session low minimum label is set from the workstation owner's minimum label at login. The session low minimum label must be greater than the user's administratively set minimum label and the lower bound of the machine monitor's label range. When this setting is changed, connection requests from clients that run at a sensitivity label lower than the window server sensitivity label are rejected unless they have privileges. See the XTSOLsetSessionLO(3XTSOL) man page.

Working With the Trusted Path Window

The XTSOLMakeTPWindow() and XTSOLIsWindowTrusted() routines are used to make the specified window the Trusted Path window and to test whether the specified window is the Trusted Path window.

Status XTSOLMakeTPWindow(Display *display, Window *w);

This routine makes the specified window the Trusted Path window. See the XTSOLMakeTPWindow(3XTSOL) man page.

Bool XTSOLIsWindowTrusted(Display *display, Window *window);

This routine tests whether the specified window is the Trusted Path window. See the XTSOLIsWindowTrusted(3XTSOL) man page.

Accessing and Setting the Screen Stripe Height

The XTSOLgetSSHeight() and XTSOLsetSSHeight() routines are used to obtain and set the screen stripe height.


Note - These interfaces should only be used by the window manager.


Status XTSOLgetSSHeight(Display *display, int screen_num, int *newHeight);

This routine obtains the screen stripe height. See the XTSOLgetSSHeight(3XTSOL) man page.

Status XTSOLsetSSHeight(Display *display, int screen_num, int newHeight);

This routine sets the screen stripe height. Be careful that you do not end up without a screen stripe or with a very large screen stripe. See the XTSOLsetSSHeight(3XTSOL) man page.

Setting Window Polyinstantiation Information

Status XTSOLsetPolyInstInfo(Display *display, m_label_t sl, uid_t *uidp, int enabled);

The XTSOLsetPolyInstInfo() routine enables a client to obtain property information from a property at a different sensitivity label than the client. In the first call, you specify the desired sensitivity label and the user ID, and set the enabled property to True. Then, you call XTSOLgetPropAttributes(), XTSOLgetPropLabel(), or XTSOLgetPropUID(). To finish, you call the XTSOLsetPolyInstInfo() routine again with the enabled property set to False. See the XTSOLsetPolyInstInfo(3XTSOL) man page.

Working With the X11 Label-Clipping Interface

int label_to_str(const m_label_t *label, char **string, const m_label_str_t conversion_type, uint_t flags);

The label_to_str() routine translates a sensitivity label or clearance to a string. See the label_to_str(3TSOL) man page.