semanage_count(3)
β¨ NAME β¨
semanage_count β this is part of the Libsemanage API documentation (aka the semanage_count(3) page, bestie, that's the manual we're living in rn) and it's literally the SELinux Management API π
πΈ SYNOPSIS πΈ
okay so here's the tea: the following count function is supported for any semanage record. You just replace the function and object name as necessary β mix and match, it's giving build-your-own-adventure π¦
extern int COUNT_FUNCTION (
semanage_handle_t *handle,
unsigned int* response);
π DESCRIPTION π
π Behavior
The count function will return the number of all objects in the selected location. That's it. That's the whole vibe. It counts. π
π Parameters
handleβ used to track persistent state across semanage calls, and for error reporting. It's the main character keeping receipts. πresponseβ the number of objects will be stored at the location pointed to byresponse. So like, pass it a pointer and it'll fill it in, no cap. β¨
β Requirements
This function requires an semanage connection to be established (see semanage_connect(3)). No connection, no counting. Periodt. π
π₯ RETURN VALUE π₯
In case of failure, -1 is returned, and the semanage error callback is invoked, describing the error π Otherwise a non-negative integer is returned (a commit number). The same number will be returned by all other semanage object read calls until the next commit. Consistency? We love to see it. π―
π SEE ALSO π
semanage_handle_create(3)semanage_connect(3)
and that's the whole page, bestie!! π«Ά this iconic lil doc was brought to you by ivg2@cornell.edu, dated 16 March 2006 β yes she's vintage, she's an elder, and she still eats π β¨
π¦ where this page comes from
- centos-stream 10: libsemanage-devel 3.11-3.el10 Β· LGPL-2.1-or-later
- debian trixie: libsemanage-dev 3.8.1-1 Β· LGPL-2.1-or-later
- fedora 43: libsemanage-devel 3.9-4.fc43 Β· LGPL-2.1-or-later
- fedora 43: libsemanage-devel 3.9-4.fc43 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.10-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.10-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.11-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.11-1.fc44 Β· LGPL-2.1-or-later
- nixos 26.05: libsemanage 3.10
- nixpkgs unstable: libsemanage 3.11
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- ubuntu questing: libsemanage-dev 3.8.1-1
- ubuntu resolute: libsemanage-dev 3.9-1build1 Β· LGPL-2.1-or-later
- ubuntu stonking: libsemanage-dev 3.11-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms