1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

libcli/security: helper to find resource attribute ACEs

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2023-08-23 12:44:26 +12:00 committed by Andrew Bartlett
parent 617cfa0e96
commit 41e1b6957a
2 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,15 @@ bool sec_ace_callback(uint8_t type)
return false;
}
/**
* Check if an ACE type is resource attribute, which means it will
* have a blob of data at the end defining an attribute on the object.
* Resource attribute ACEs should only occur in SACLs.
*/
bool sec_ace_resource(uint8_t type)
{
return type == SEC_ACE_TYPE_SYSTEM_RESOURCE_ATTRIBUTE;
}
/*******************************************************************
Sets up a struct security_ace structure.

View File

@ -26,6 +26,7 @@
bool sec_ace_object(uint8_t type);
size_t ndr_subcontext_size_of_ace_coda(const struct security_ace *ace, size_t ace_size, int flags);
bool sec_ace_callback(uint8_t type);
bool sec_ace_resource(uint8_t type);
void init_sec_ace(struct security_ace *t, const struct dom_sid *sid, enum security_ace_type type,
uint32_t mask, uint8_t flag);