cap_init, cap_free, cap_dup - capability data object storage management
cap_t cap_init(void);
int cap_free(void *obj_d);
cap_init creates a capability state in working storage and return a pointer to the capability state. The initial value of all flags are cleared. The caller should free any releasable memory, when the capability state in working storage is no longer required, by calling cap_free with the cap_t as an argument.
cap_free liberates any releasable memory that has been allocated to the capability state identified by obj_d. The obj_d argument may identify either a cap_t entity, or a char * entity allocated by the cap_to_text function.
cap_dup returns a duplicate capability state in working storage given by the source object cap_p, allocating any memory necessary, and returning a pointer to the newly created capability state. Once duplicated, no operation on either capability state affects the other in any way.
cap_free returns zero on success, and -1 on failure.
On failure, errno(3) is set to EINVAL, or ENOMEM.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |