summaryrefslogtreecommitdiff
path: root/source4/lib/policy
AgeCommit message (Collapse)AuthorFilesLines
2025-05-19s4:libnet: pass an explicit talloc parent to libnet_context_init()Stefan Metzmacher1-1/+1
We should not implicitly use the tevent_context as talloc parent. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smbcli_full_connection()Stefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports from smbcli_full_connection()Stefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-06-05build: Remove incorrect pyembed=True from samba-policyAndrew Bartlett1-7/+3
This is a normal C library, used by python but does not use any python itself (nor by dependencies any longer). Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-06-05s4-libnet: Split up samba-net into samba-net and samba-net-joinAndrew Bartlett1-2/+1
samba-net-join links to python and so needs the variable name with the python ABI tag, while samba-net is a normal C library and can be included in a package without python dependencies. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2023-11-20Use python.h from libreplaceAndreas Schneider1-1/+1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-08s4:policy: Fix leakJoseph Sutton1-0/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-28s4:lib:policy: cleanup and handle errors in push_recursive()Dmitry Antipov1-12/+37
Prefer 'char' and 'ssize_t' over 'int' for I/O-related calls and handle more possible errors in push_recursive(). Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Mulder <dmulder@samba.org> Autobuild-User(master): David Mulder <dmulder@samba.org> Autobuild-Date(master): Fri Apr 28 14:19:12 UTC 2023 on atb-devel-224
2022-03-17s4:policy: Fix ACE type comparisonJoseph Sutton1-1/+2
SEC_ACE_TYPE_ values are not flags, so this comparison does not behave as intended. Modify the check to more closely match the comment. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-02-07lib: Fix CID 1465285 Double closeVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-07-06policy/gp: always close a file (CID 1445119)Douglas Bagnall1-0/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-05-08Fix clang 9 missing-field-initializer warningsGary Lockyer1-1/+1
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2020-03-23py3: Remove #define PyInt_FromLong PyLong_FromLongAndrew Bartlett1-4/+4
This allows us to end the use of Python 2/3 compatability macros. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power
2019-12-10s4:lib: Make sure we close fd's in error pathAndreas Schneider1-1/+9
Found by covscan. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-06-24py3: Remove PyStr_FromString() compatability macroAndrew Bartlett1-2/+2
We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
2019-05-10s4/lib/policy/gp_ldap: use ldb API to find messagesDouglas Bagnall1-12/+12
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-05-10s4/policy/gp_filesys: avoid SIZE_MAX smbcli write (CID 1034779)Douglas Bagnall1-0/+6
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-03-21build: Remove bld.gen_python_environments()Andrew Bartlett1-7/+6
This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2019-02-07Cleanup (decref) some objects added to list.Noel Power1-2/+16
PyList_Append doesn't steal references, so if the item created is a temp object, created just to be added to the list we need to decref the item appended in order for it to be released. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-11s4:lib: Fix a possible fd leak in gp_get_file()Andreas Schneider1-8/+16
Found by covscan. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13567 Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Justin Stephenson <jstephen@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-04-13s3/lib/policy/wscript_build: build samba_policy lib for extra-python/py3Noel Power1-6/+9
pypolicy module needs appropriate samba_policy library for extra-python/py3 therefore we need to build it for it to be available Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-04-05wscript_build: fix c modules deps name for Python 3Joe Guo1-5/+7
In wscript_build, the lib name in deps list may have postfix for Python 3. Instead of hard coding the base name directly, need to load correct name for each Python version with `bld.pyembed_libname`. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-04-05python3 port for policy moduleNoel Power2-11/+22
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-11-22s4-lib-policy: fix type of enumUri Simchoni1-1/+1
Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-05-10s4-lib/policy: remove some dead prototypesGünther Deschner1-2/+0
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-03-10waf: disable-python - don't build samba-policyIan Stakenvicius1-1/+2
samba-policy requires samba-net which requires PROVISION, which is disabled when python isn't available. Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-02-06s4-libgpo: fix gcc6 build warning.Günther Deschner1-6/+0
source4/lib/policy/gp_ldap.c:48:35: warning: 'gpo_inheritance' defined but not used [-Wunused-const-variable] Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-05Remove a number of NT_STATUS_HAVE_NO_MEMORY_AND_FREE macros from the codebase.Garming Sam3-50/+200
Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: I133eb5a699757ae57b87d3bd3ebbcf5b556b0268 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-11gpo: Fix CID 1034880 Resource leakVolker Lendecke1-2/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Mon Nov 11 22:59:10 CET 2013 on sn-devel-104
2013-11-11gpo: Fix CID 1034881 Resource leakVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2013-02-22s4-policy: Fix memory leaks in push_recursive().Andreas Schneider1-14/+26
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2012-03-06policy/python: Move python binding tests to standard location.Jelmer Vernooij1-36/+0
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Tue Mar 6 02:26:29 CET 2012 on sn-devel-104
2011-11-11policy/tests: Fix import of TestCase.Jelmer Vernooij1-2/+3
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Fri Nov 11 01:10:49 CET 2011 on sn-devel-104
2011-11-10test: fixed several tests to use samba.testsAndrew Tridgell1-2/+2
this fixes error checking. Test failures were not being detected otherwise Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-10-27replace: Add don't include unistd.h directly and add uid_wrapper.Andreas Schneider1-3/+1
2011-09-23build: avoid util.h as a public header name due to conflict with MacOSAndrew Bartlett1-1/+1
2011-08-21s4/libpolicy: Install header file.Jelmer Vernooij4-8/+6
2011-08-03s4-policy: Use the correct local directory for stat.Amitay Isaacs1-1/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-03s4-policy: Add python wrapper for ads_to_dir_access_mask() functionAmitay Isaacs1-2/+17
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-03s4-policy: Expose gp_ads_to_dir_access_mask() functionAmitay Isaacs2-1/+2
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-26policy: Rename to samba-policy to avoid name space clashes.Jelmer Vernooij2-5/+5
2011-03-30s4:lib/policy/gp_ldap.c - make more use of LDB result constantsMatthias Dieter Wallnöfer1-13/+13
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Wed Mar 30 09:33:38 CEST 2011 on sn-devel-104
2011-03-19source4/lib: Fix prototypes for all functions.Jelmer Vernooij1-0/+2
2011-03-15s4-policy: don't make s4 policy.h publicAndrew Tridgell1-1/+0
if we are going to make GPO headers public, it should be from libgpo/
2011-02-10ldb: use #include <ldb.h> for ldbAndrew Tridgell1-1/+1
thi ensures we are using the header corresponding to the version of ldb we're linking against. Otherwise we could use the system ldb for link and the in-tree one for include Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-08s4-pkgconfig: add @LIB_RPATH@ to our link flagsAndrew Tridgell1-1/+1
this is only set when rpath is used on install. It ensures that applications that link against Samba libraries get the rpath right Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Dec 8 12:46:00 CET 2010 on sn-devel-104
2010-10-31s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij1-6/+0
The new waf-based build system now has all the same functionality, and the old build system has been broken for quite some time. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-26talloc: change pytalloc-util to be a public library.Jelmer Vernooij1-1/+1
2010-10-26s4: Drop duplicate 'lib' prefix for private libraries.Jelmer Vernooij1-1/+1
2010-10-24s4: Rename LIBSAMBA-* to libsamba-*Jelmer Vernooij1-1/+1