SQLBOX_ROLE_HIER_SINK(3)

NAME
sqlbox_role_hier_sink - add a sink node to a hierarchy

LIBRARY
sqlbox

SYNOPSIS
#include <stdint.h>
#include <sqlbox.h>
int
sqlbox_role_hier_sink(struct sqlbox_role_hier *p, size_t sink);

DESCRIPTION
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.

RETURN VALUES
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.

SEE ALSO
sqlbox_role_hier_alloc(3)