SQLBOX_ROLE_HIER_START(3) Library Functions Manual SQLBOX_ROLE_HIER_START(3)

sqlbox_role_hier_start
add a start (source) node to a hierarchy

library “sqlbox”

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

int
sqlbox_role_hier_start(struct sqlbox_role_hier *p, size_t start);

Set start such that it may transition into any other role in p but that no other role may transition into it. These are usually called “sources” but called starting nodes to disambiguate from sqlbox_role_hier_src(3). The node may not already be the parent or child of any other node as set with sqlbox_role_hier_child(3) nor a sink node. There may be multiple starting nodes. Setting multiple times as a start is a no-op.

A start has sibling transition to all other nodes: it will not inherit any permissions from other nodes.

Returns zero if start is not a valid role, has already been assigned as a child or parent, is a sink, or memory allocation fails. Returns non-zero otherwise.

sqlbox_role_hier_alloc(3)
November 1, 2019 OpenBSD 6.5