91 |
/* The capability object on which the RPC was invoked. */ |
/* The capability object on which the RPC was invoked. */ |
92 |
hurd_cap_obj_t obj; |
hurd_cap_obj_t obj; |
93 |
|
|
94 |
|
/* The capability handle on which the RPC was invoked. */ |
95 |
|
hurd_cap_handle_t handle; |
96 |
|
|
97 |
/* Private members. */ |
/* Private members. */ |
98 |
|
|
530 |
must be inhibited. */ |
must be inhibited. */ |
531 |
error_t hurd_cap_bucket_end (hurd_cap_bucket_t bucket, bool force); |
error_t hurd_cap_bucket_end (hurd_cap_bucket_t bucket, bool force); |
532 |
|
|
533 |
|
|
534 |
|
/* If you want to use other capabilities in an RPC handler beside the |
535 |
|
one on which the RPC was invoked, you need to make sure that |
536 |
|
inhibition works on those other capabilities and cancel your |
537 |
|
operation. For this, the following interfaces are provided. */ |
538 |
|
|
539 |
|
/* Forward. */ |
540 |
|
struct hurd_cap_ctx_cap_use; |
541 |
|
|
542 |
|
/* Return the number of bytes required for a hurd_cap_ctx_cap_use |
543 |
|
structure. */ |
544 |
|
size_t hurd_cap_ctx_size (void) __attribute__ ((const)); |
545 |
|
|
546 |
|
/* The calling thread wishes to execute an RPC on the the handle |
547 |
|
HANDLE. The calling thread must already be registered as executing |
548 |
|
an RPC. RPC_CTX is the cooresponding RPC context. The function |
549 |
|
uses the structure CAP_USE, which must point to the number of bytes |
550 |
|
returned by hurd_cap_ctx_size, to store data required by |
551 |
|
hurd_cap_ctx_end_cap_use. The capability object corresponding to |
552 |
|
HANDLE is locked and returned in *OBJP. |
553 |
|
|
554 |
|
Returns EINVAL if the capability handle is invalid for the client. |
555 |
|
|
556 |
|
Returns ENOENT if there is no object associated with handle HANDLE. |
557 |
|
|
558 |
|
Returns EBAD if the capability is dead. |
559 |
|
|
560 |
|
Returns EDOM if the object associated with HANDLE is not in class |
561 |
|
REQUIRED_CLASS. If no type check is required, it will be skipped |
562 |
|
if REQURIED_CLASS is NULL. */ |
563 |
|
error_t hurd_cap_ctx_start_cap_use (hurd_cap_rpc_context_t rpc_ctx, |
564 |
|
hurd_cap_handle_t handle, |
565 |
|
hurd_cap_class_t required_class, |
566 |
|
struct hurd_cap_ctx_cap_use *cap_use, |
567 |
|
hurd_cap_obj_t *objp); |
568 |
|
|
569 |
|
/* End the use of the object CAP_USE->OBJ, which must be locked. */ |
570 |
|
void hurd_cap_ctx_end_cap_use (hurd_cap_rpc_context_t rpc_ctx, |
571 |
|
struct hurd_cap_ctx_cap_use *cap_use); |
572 |
|
|
573 |
#endif /* _HURD_CAP_SERVER_H */ |
#endif /* _HURD_CAP_SERVER_H */ |