summaryrefslogtreecommitdiff
path: root/libcli/security/security_descriptor.c
AgeCommit message (Collapse)AuthorFilesLines
2024-12-17libcli: Avoid an unnecessary "else"Volker Lendecke1-1/+2
We return in the if-branch Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2024-12-03lib: Simplify security_descriptor_initialise() with a struct initVolker Lendecke1-11/+10
Rely no the default NULL init. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-11-12libcli: Try to fix CID 1609583 Overflowed constantVolker Lendecke1-2/+6
Coverity does not like the --i Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2023-10-01libcli/security: Handle new ACE types with sec_ace_object()Joseph Sutton1-24/+5
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-01libcli/security: Have security_ace_equal() handle callback and resource ACEsJoseph Sutton1-6/+105
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-27libcli:security: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2023-03-22libcli/security: Correctly handle ACL deletionJoseph Sutton1-0/+1
If there were two consecutive occurrences of an ACL to be deleted, we would miss the second one. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-22libcli/security: add security_descriptor_[s|d]acl_insert() helpersStefan Metzmacher1-0/+28
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-03-22libcli/security: prepare security_descriptor_acl_add() to place the ace at a ↵Stefan Metzmacher1-7/+20
position Often it is important to insert an ace at a specific position in the ACL. As a default we still append by default by using -1, which is the generic version of passing the number of existing aces. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-03-09lib: Fix a typoVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-09libcli/security: Avoid includes.hVolker Lendecke1-1/+1
Don't rebuild libcli/security when not necessary Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-09lib: Fix whitespaceVolker Lendecke1-15/+15
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-09-27libcli security_descriptor: Compare object type and inherited object type ↵Christian Merten1-0/+35
when comparing ACEs Fixed security_ace_equal returning true, despite differing object type, by checking (inherited) object type of both ACEs is equal. Signed-off-by: Christian Merten <christian@merten.dev> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-09-27libcli security_descriptor: Add function to delete a given ace from a ↵Christian Merten1-0/+66
security descriptor Two functions have been added to delete a given ace from the SACL or the DACL of a security descriptor. Signed-off-by: Christian Merten <christian@merten.dev> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-11-19lib: Remove unused security_descriptor_append()Volker Lendecke1-12/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-03-26libcli: Use ARRAY_DEL_ELEMENT() in security_descriptor_acl_del()Volker Lendecke1-2/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-30libcli: Align integer typesVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2018-12-12libcli:security: Return early if there are no aces to duplicateAndreas Schneider1-5/+10
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Dec 12 22:18:52 CET 2018 on sn-devel-144
2018-12-12libcli:security: Do not duplicate invalid acesAndreas Schneider1-0/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2015-03-30libcli/security: add security_descriptor_for_client() helper functionStefan Metzmacher1-0/+70
This prepares a possibly stripped security descriptor for a client. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2014-12-04libcli/security: add a function that checks for MS NFS ACEsRalph Boehme1-0/+22
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-29libcli/security: cleanup security_ace_equal()David Disseldorp1-8/+20
This change cleans up the white-space damage, and converts the single line if-then statements to match Samba's coding conventions. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-05-27libcli: Fix a memleakVolker Lendecke1-5/+3
struct security_ace has a struct dom_sid, not a pointer to it. So we don't have to talloc it first and then not free it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue May 27 12:54:55 CEST 2014 on sn-devel-104
2011-02-21libcli/security/security_descriptor.c - fix three wrong counter variablesMatthias Dieter Wallnöfer1-3/+3
These strictly need to be "uint32_t" since "acl*->num_aces" has been defined by this type. This counter patchset has been reviewed by Andrew Bartlett.
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-2/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-06-19libcli: Fixed a segfault in security_acl_dup when the acl is NULL.Brendan Powers1-0/+4
This can happen when duplicating a security descriptor that is missing either sacls or dacls. Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2009-09-20Initial implementation of security descriptor creation in DSNadezhda Ivanova1-0/+50
TODO's: ACE sorting and clarifying the inheritance of object specific ace's.
2009-09-16Owner and group defaulting.Nadezhda Ivanova1-1/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-06-19A fix in the ACL code used by both SAMBA 3 and 4Matthias Dieter Wallnöfer1-1/+1
This fixes an uninitialised structure. It has been found through valgrind in the RAW-ACLs test suite (Bug #6397).
2009-04-21Fix includes for security_descriptor file for the non-merged build.Jelmer Vernooij1-1/+2
2009-04-21Move the security_descriptor utility code to the top-level.Jelmer Vernooij1-0/+533