SQLBOX_ROLE_HIER_STMT(3) Library Functions Manual SQLBOX_ROLE_HIER_STMT(3)

sqlbox_role_hier_stmtadd a permission to a role

library “sqlbox”

#include <stdint.h>
#include <sqlbox.h>

int
sqlbox_role_hier_src(struct sqlbox_role_hier *p, size_t role, size_t src);

int
sqlbox_role_hier_stmt(struct sqlbox_role_hier *p, size_t role, size_t stmt);

Add permissions (statements or sources) to a role. Adding a duplicate permission is a noop. Adding the same permission as claimed by an ancestor is effectively a noop as well. These permissions will be inherited by any children (see sqlbox_role_hier_child(3)) when the roles are generated with sqlbox_role_hier_gen(3).

Returns zero if role exceeds the number of roles specified in sqlbox_role_hier_alloc(3) or if memory allocation fails. Returns non-zero otherwise.

sqlbox_role_hier_child(3), sqlbox_role_hier_gen(3)

December 2, 2023 OpenBSD 7.4