libugidfw(3)

libugidfw3

Library interface to the file system firewall mac policy

Usage

#include <sys/types.h>

#include <security/mac_bsdextended/mac_bsdextended.h>

#include <ugidfw.h>

Library

library “libugidfw”

Overview

The libugidfw library routines provide an interface to the mac_bsdextended(4) file system firewall MAC policy.

The libugidfw library defines the following functions:

bsde_rule_to_string()

Converts the internal representation of a rule (struct mac_bsdextended_rule) into its text representation; see bsde_rule_to_string(3).

bsde_parse_rule()

Parses an entire rule (in argument array form); see bsde_parse_rule(3).

bsde_parse_rule_string()

Parses an entire rule string; see bsde_parse_rule_string(3).

bsde_get_rule_count()

Returns the total number of ugidfw rules being enforced in the system; see bsde_get_rule_count(3).

bsde_get_rule_slots()

Returns the total number of used rule slots; see bsde_get_rule_slots(3).

bsde_get_rule()

Returns a rule by its rule number; see bsde_get_rule(3).

bsde_delete_rule()

Deletes a rule by its rule number; see bsde_delete_rule(3).

bsde_set_rule()

Uploads the rule to the mac_bsdextended(4) module and applies it; see bsde_set_rule(3).

bsde_add_rule()

Upload the rule to the module, automatically selecting the next available rule number; see bsde_add_rule(3).

Releases

56 releases since FreeBSD 5.0-RELEASE; the text changed 38 times.

  1. 5.0
  2. 5.1
  3. 5.2–5.2.1
  4. 5.3–5.4
  5. 5.5
  6. 6.0–6.1
  7. 6.2–6.3
  8. 6.4
  9. 7.0
  10. 7.1
  11. 7.2
  12. 7.3
  13. 7.4
  14. 8.0
  15. 8.1
  16. 8.2
  17. 8.3
  18. 8.4
  19. 9.0
  20. 9.1
  21. 9.2
  22. 9.3
  23. 10.0
  24. 10.1
  25. 10.2
  26. 10.3
  27. 10.4
  28. 11.0
  29. 11.1
  30. 11.2
  31. 11.3
  32. 11.4
  33. 12.0
  34. 12.1
  35. 12.2
  36. 12.3
  37. 12.4
  38. 13.0–13.2
  39. 13.3–16.0

Authors

This software was contributed to the FreeBSD Project by Network Associates Labs, the Security Research Division of Network Associates Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (“CBOSS”), as part of the DARPA CHATS research program.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.