SQLBOX_ROLE_HIER_SINK(3) Library Functions Manual SQLBOX_ROLE_HIER_SINK(3)

sqlbox_role_hier_sinkadd a sink node to a hierarchy

library “sqlbox”

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

int
sqlbox_role_hier_sink(struct sqlbox_role_hier *p, size_t sink);

Set sink such that it may be transitioned into from any other role in p but may not transition out. It may not already be the parent or child of any other node as set with sqlbox_role_hier_child(3) or a start node as set with sqlbox_role_hier_start(3). There may be multiple sink nodes. Setting multiple times as a sink is a no-op.

A sink is considered a sibling transition: it will not inherit any permissions from other nodes.

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

sqlbox_role_hier_alloc(3)

December 2, 2023 OpenBSD 7.4