summaryrefslogtreecommitdiff
path: root/libgpo
Commit message (Collapse)AuthorAgeFilesLines
* python.gpo.ADS_STRUCT: check type of loadparm argumentDouglas Bagnall2018-05-031-1/+8
| | | | | | | And add a test showning the segfault. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wscript_build: make sure we link extra-python versions of librariesNoel Power2018-04-131-2/+3
| | | | | | 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>
* libgpo: gpo_copy_file() shouldn't explicitly call smb1David Mulder2018-04-121-1/+1
| | | | | | | | | | | Don't call cli_openx directly to open a file this calls smb1 code explicitly, which fails if we did a multi-protocol negotiate and negotiated smb2+. Use the higher level cli_open() instead. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pygpo: Fix CID 1422263 Resource leakVolker Lendecke2018-04-041-2/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libgpo: port samba.gpo to python3David Mulder2018-03-232-13/+26
| | | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* libgpo: Add FALL_THROUGH statements in gpo_sec.cAndreas Schneider2018-03-011-2/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libgpo: Fix the build --without-adsVolker Lendecke2018-02-061-0/+5
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Feb 6 15:36:01 CET 2018 on sn-devel-144
* libgpo: Remedy some longer linesGarming Sam2017-12-151-23/+41
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: Tidy up some if statementsGarming Sam2017-12-151-16/+32
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: typo credentaials -> credentialsGarming Sam2017-12-151-1/+1
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: Always check for ldap_server argumentGarming Sam2017-12-151-1/+3
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: Fix CID 1422263 Resource leakVolker Lendecke2017-11-221-0/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 22 02:03:17 CET 2017 on sn-devel-144
* libgpo: Fix CID 1422262 Explicit null dereferencedVolker Lendecke2017-11-211-1/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix formating of sources to be less than 80 linesGarming Sam2017-11-211-28/+58
| | | | | | | | | Signed-off-by: David Mulder <dmulder@suse.com> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Tue Nov 21 01:51:59 CET 2017 on sn-devel-144
* python: Convert gop.GROUP_POLICY_OBJECT to pytallocAndrew Bartlett2017-11-201-82/+51
| | | | | | | | | | | | This avoids PyCapsule calls not available in Python 2.6 We remove the __init__ function as it is useless, the object is created by py_ads_get_gpo_list() which now returns a python list rather than an iterator. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* python: Remove talloc_stackframe() held in an objectAndrew Bartlett2017-11-201-11/+15
| | | | | | | | | | talloc_stackframe() must not be held after the return from a function. If this causes warnings (talloc_tos() use without a stackframe), this must be fixed in each function. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* libgpo: Setup the stack frame in ads_connectDavid Mulder2017-11-201-0/+9
| | | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python: Remove Python 2.4 compat macroAndrew Bartlett2017-11-201-4/+0
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* python: Use py_check_dcerpc_type() to safely check for credentialsAndrew Bartlett2017-11-202-4/+16
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* pygpo: Check for errors in gpo.gpo_get_sysvol_gpt_version()Andrew Bartlett2017-11-201-1/+11
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* libgpo: Add libgpo python bindingsDavid Mulder2017-11-201-2/+387
| | | | | | | | Create libgpo python bindings for GROUP_POLICY_OBJECT, ADS_STRUCT, gpo_get_unix_path, ads_connect, and ads_get_gpo_list. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* gpo: fix the building of gpext to only onceGarming Sam2017-11-201-7/+6
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* gpo: Add python libgpo bindingsLuke Morrison2017-11-205-5/+1461
| | | | | | | | Split from "Initial commit for GPO work done by Luke Morrison" by David Mulder Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Luke Morrison <luke@hubtrek.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Revert "libgpo: remove unused libgpo wscript_build."Garming Sam2017-11-201-0/+7
| | | | | | | This reverts commit feffac806800c1740521133e88a7ac777ce8f368. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: gpo: Put enforced GPOs at the end of the list.Lutz Justen2017-09-231-8/+57
| | | | | | | | | | | | | | Enforced GPOs should be applied on top of all non-enforced GPOs, so that they override policies set in non-enforced GPOs. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13046 Signed-off-by: Lutz Justen <ljusten@google.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Sat Sep 23 05:25:19 CEST 2017 on sn-devel-144
* lib: gpo: Fixes issue with GPOPTIONS_BLOCK_INHERITANCE.Lutz Justen2017-09-231-63/+77
| | | | | | | | | | | | | GP links with the GPOPTIONS_BLOCK_INHERITANCE option set were blocking GPOs from the same link (i.e. an OU with the flag set would block its own GPOs). This patch makes sure the GPOs from the link are added to the list. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13046 Signed-off-by: Lutz Justen <ljusten@google.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib: gpo: Changes order to match GPO application order.Lutz Justen2017-09-231-12/+12
| | | | | | | | | | | | | | The order of GPOs in a gpo_list generated by ads_get_gpo_list did not match the order of application. Since GPOs are pushed to the FRONT of gpo_list, GPOs have to be pushed in the opposite order of application. (Pushing to front is useful to get inheritance blocking right). BUG: https://bugzilla.samba.org/show_bug.cgi?id=13046 Signed-off-by: Lutz Justen <ljusten@google.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* CVE-2017-12150: libgpo: make use of SMB_SIGNING_REQUIRED in gpo_connect_server()Stefan Metzmacher2017-09-201-1/+1
| | | | | | | | It's important that we use a signed connection to get the GPOs! BUG: https://bugzilla.samba.org/show_bug.cgi?id=12997 Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib: Give util_paths.c its own headerVolker Lendecke2017-06-241-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: libgpo: Allow skipping GPO objects that don't have the expected LDAP ↵Jeremy Allison2017-03-161-6/+21
| | | | | | | | | | | | | | | | | | | | | attributes. We expect the following attributes to be present in an LDAP GPO object: displayName flags gPCFileSysPath name ntSecurityDescriptor versionNumber and fail if a result is returned without them. Change this to skip results that don't contain these attributes instead. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12695 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* libgpo: Fix error check in gp_inifile_init_context_direct()Günther Deschner2017-01-201-2/+2
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: allow empty values in gp inifile parsing code.Günther Deschner2017-01-061-4/+5
| | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jan 6 16:16:02 CET 2017 on sn-devel-144
* libgpo: default to empty values if none are thereGünther Deschner2017-01-061-1/+1
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: deal with non utf16-le ini files.Günther Deschner2017-01-061-14/+18
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: apply some const.Günther Deschner2017-01-062-7/+7
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: add gp_inifile_enum_section()Günther Deschner2017-01-062-0/+79
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: add gp_inifile_init_context_direct()Günther Deschner2017-01-062-1/+56
| | | | | | | | | | This varient ignores the group policy flags and does not try to find the right unix path. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in ↵Günther Deschner2016-09-281-2/+2
| | | | | | | | | libgpo/gpext/gpext.c Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: accept more boolean matches in gp_inifile_getbool().Günther Deschner2016-09-111-2/+4
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: Correctly use the 'server' parameter after parsing it out of the GPO ↵Jeremy Allison2016-08-101-1/+1
| | | | | | | | | path. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* libgpo: Fix compiler errors when building with --address-sanitizerAndrew Bartlett2016-06-161-1/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* Fix various spelling errorsMathieu Parent2015-11-061-1/+1
| | | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Nov 6 13:43:45 CET 2015 on sn-devel-104
* samba: pass down size_t instead of int to add_string_to_array().Günther Deschner2014-11-171-1/+1
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Mon Nov 17 19:53:22 CET 2014 on sn-devel-104
* libgpo: replace dup_sec_desc() usageDavid Disseldorp2014-05-281-1/+7
| | | | | | | | Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Remove a number of NT_STATUS_HAVE_NO_MEMORY_AND_FREE macros from the codebase.Garming Sam2014-03-051-8/+32
| | | | | | | | | | | 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>
* libgpo: apply some const.Günther Deschner2014-01-075-13/+13
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jan 7 18:52:42 CET 2014 on sn-devel-104
* libgpo: only use libgpo/gpext/gpext.h where really needed.Günther Deschner2014-01-072-2/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: allow to pass down a list of deleted GPOs in gpo_process_gpo_list().Günther Deschner2014-01-072-4/+6
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: remove some unused code and remove that important FIXME note.Günther Deschner2014-01-071-93/+0
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: directly call gpext_process_extension() from gpo_process_gpo_list.Günther Deschner2014-01-071-41/+5
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>