NAME
sqlbox_role_hier_start
—
add a start (source) node to a
hierarchy
LIBRARY
library “sqlbox”
SYNOPSIS
#include
<stdint.h>
#include <sqlbox.h>
int
sqlbox_role_hier_start
(struct
sqlbox_role_hier *p, size_t start);
DESCRIPTION
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.
RETURN VALUES
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.