7.6 Key security descriptors
int ;
int ;
Keys are KACS-secured, so their SDs are read and written with the same <peios/security.h> vocabulary as files and tokens; security_info selects components (owner/group/DACL/SACL).
peios_reg_get_securityreads the selected components intosd(KACS binary form), writing the length to*sd_len_out(may beNULL); a too-small buffer returnsERANGEwith the required size there, and a zerocapprobes. Owner/group/DACL needREAD_CONTROL; the SACL needsACCESS_SYSTEM_SECURITY.peios_reg_set_securityapplies the selected components ofsd, merging with the rest (the kernel parses and validates). The DACL needsWRITE_DAC, the ownerWRITE_OWNER, the SACLACCESS_SYSTEM_SECURITY. Heretxn_fdgives atomicity, not layer qualification (SDs are not layered), or-1to apply immediately. SD changes affect only future opens — handles already open keep their fixed grant.