NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SUMMARY OF TRUSTED SOLARIS CHANGES | SEE ALSO
#include <door.h>int door_create(void *server_procedure, void *cookie, char *argp, size_t arg_size, door_desc_t *dp, uint_t n_desc, void *cookie, uint_t attributes);
The door_create() function creates a door descriptor that describes the procedure specified by the function server_procedure.
In the Trusted Solaris environment, door_create() sets the door CMW
label and MAC policy based on attributes of the creating process. The CMW label of the door is set equal to the CMW label of the calling process. If the calling process has the sys_system_door
privilege,
the MAC policy is set to MAC_ANY, otherwise its MAC policy is set to MAC_EQUAL.
The data item, cookie, is associated with the door descriptor, and is passed as an argument to the invoked function server_procedure during door_call(3X) invocations. Other arguments passed to server_procedure from an associated door_call() are placed on the stack and include argp and dp. argp points to arg_size bytes of data and dp points to n_desc door_desc_t structures. The attributes flag specifies attributes associated with the newly created door. Valid values for attributes are constructed by ORing in one or more of the following values:
Delivers a special invocation on the door when the number of descriptors that refer to this door drops to one. In order to trigger this condition, more than one descriptor must have referred to this door at some time. DOOR_UNREF_DATA designates an unreferenced invocation, as the argp argument passed to server_procedure. In the case of an unreferenced invocation, the values for arg_size , dp and n_did are 0. Only one unreferenced invocation is delivered on behalf of a door.
Similar to DOOR_UNREF, except multiple unreferenced invocations can be delivered on the same door if the number of descriptors referring to the door drops to one more than once. Since an additional reference may have been passed by the time an unreferenced invocation arrives, the DOOR_IS_UNREF attribute returned by the door_info(3X) call can be used to determine if the door is still unreferenced.
Maintains a separate pool of server threads on behalf of the door. Server threads are associated with a door's private server pool using door_bind(3X).
The descriptor returned from door_create() will be marked as close on exec (FD_CLOEXEC). Information about a door is available for all clients of a door using door_info(3X). Programs concerned with security should not place secure information in door data that is accessible by door_info(). In particular, secure data should not be stored in the data item cookie.
By default, additional threads are created as needed to handle concurrent door_call(3X) invocations. See door_server_create(3X) for information on how to change this behavior.
The door_create() function will fail if:
Invalid attributes are passed.
The process has too many open descriptors.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Architecture | all |
Availability | SUNWcsu |
Stability | Evolving |
MT-Level | Safe |
In the Trusted Solaris environment, door_create() sets the door CMW label and MAC policy based on attributes of the creating process. The CMW label of the door is set equal to the CMW label of the calling
process. If the calling process has the sys_system_door
privilege, the MAC policy is set to MAC_ANY, otherwise its MAC policy is set to MAC_EQUAL.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SUMMARY OF TRUSTED SOLARIS CHANGES | SEE ALSO