summaryrefslogtreecommitdiff
path: root/libgpo
Commit message (Collapse)AuthorAgeFilesLines
* s3: safe_string: do not include string_wrappers.hMatthew DeVore2020-08-282-0/+2
| | | | | | | | | | | | | Rather than have safe_string.h #include string_wrappers.h, make users of string_wrappers.h include it explicitly. includes.h now no longer includes string_wrappers.h transitively. Still allow includes.h to #include safe_string.h for now so that as many modules as possible get the safety checks in it. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gpo: Apply Group Policy Login Prompt MessageDavid Mulder2020-08-272-0/+53
| | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* gpo: Apply Group Policy Message of the dayDavid Mulder2020-08-272-0/+18
| | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* gpo: Add admx files for smb.conf parametersDavid Mulder2020-08-272-0/+7017
| | | | | | | | | | | | Administrative Template (admx) files are installed to the sysvol central store, and apply Group Policy settings to the sysvol, via the Group Policy Management Console (gpmc). These admx files add smb.conf settings to the gpmc. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* gpo: Apply Group Policy Sudo RightsDavid Mulder2020-08-062-0/+12
| | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* gpo: Move all scripts to a sub-category in samba.admxDavid Mulder2020-08-062-8/+12
| | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* gpo: Apply Group Policy Weekly ScriptsDavid Mulder2020-08-062-0/+12
| | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* gpo: Apply Group Policy Monthly ScriptsDavid Mulder2020-08-062-0/+12
| | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* gpo: Apply Group Policy Hourly ScriptsDavid Mulder2020-08-062-0/+12
| | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* libgpo: only install group policy admx files when building as DCGünther Deschner2020-06-301-1/+2
| | | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Tue Jun 30 07:51:48 UTC 2020 on sn-devel-184
* gpo: Run Group Policy ScriptsDavid Mulder2020-06-234-0/+47
| | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3: libsmb: In struct file_info rename mode -> attr.Jeremy Allison2020-06-041-1/+1
| | | | | | | | Cleanup. It's never been a UNIX mode, always a DOS attribute field. Make that explicit. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* libgpo: Remove unused codeStefan Metzmacher2020-05-263-239/+0
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue May 26 11:22:07 UTC 2020 on sn-devel-184
* Fix clang 9 missing-field-initializer warningsGary Lockyer2020-05-081-4/+4
| | | | Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: parse_gp_ext: do not crash upon no ext_stringsDouglas Bagnall2020-01-131-1/+3
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pygpo: use correct method flagsDouglas Bagnall2019-12-041-1/+1
| | | | | | | | | | | | | | The METH_KEYWORDS argument must always be combined with METH_VARARGS. In Python up to 3.7 this was checked at runtime, and as we had no callers to get_unix_path() in Python we never noticed. In Python 3.8 it is checked at import time, and everyone notices even if they aren't directly using GPOs. Found and reported by Val Kulkov. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14209 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libgpo/gpo_filesync.c: typo fixesBjörn Jacke2019-10-311-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* s3:libnet: Require sealed LDAP SASL connections for joiningAndreas Schneider2019-10-091-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* py3: Remove PyStr_FromString() compatability macroAndrew Bartlett2019-06-241-3/+3
| | | | | | | | 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>
* squash 'cast between incompatible function types' warningNoel Power2019-05-161-4/+9
| | | | | | | | | | | | To avoid warning above produced by using -Wcast-function-type we; + ensure PyCFunctions of type METH_NOARGS defined dummy arg + ensure PyCFunctions of type METH_KEYWORDS use PY_DISCARD_FUNC_SIG macro Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* make some auth functions return an NTSTATUS like other similar functions for ↵Kristján Valur2019-04-021-4/+7
| | | | | | | | | | | better diagnostics. Signed-off-by: Kristján Valur <kristjan@rvx.is> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Apr 2 02:12:48 UTC 2019 on sn-devel-144
* build: Remove bld.gen_python_environments()Andrew Bartlett2019-03-211-6/+5
| | | | | | | This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* pygpo: take ownership of password pointerKristján Valur2019-03-071-3/+3
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson <kristjan@rvx.is> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Thu Mar 7 15:08:19 UTC 2019 on sn-devel-144
* pygpo: Safer handling of memory for ads_ptr.Kristján Valur2019-03-071-27/+37
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson <kristjan@rvx.is> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* pygpo: Fix module initialization.Kristján Valur2019-03-071-16/+19
| | | | | | | | | | | | | * Add reference count to type. * Add error checking. * Remove unnecessary tp_new method. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson <kristjan@rvx.is> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* pygpo: keep a reference to python credentials in the ADS struct to keep the ↵Kristján Valur2019-03-071-5/+8
| | | | | | | | | internal pointer valid. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson <kristjan@rvx.is> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* pygpo: More python exception cleanup.Kristján Valur2019-03-071-52/+51
| | | | | | | | | | | | | | | * Don't override existing exceptions. * Careful with talloc contexts. * Return NULL on error. * Add more information to exception messages from internal functions. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson <kristjan@rvx.is> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* pygpo: Fix error handing when getting gpo unix path.Kristján Valur2019-03-071-6/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson <kristjan@rvx.is> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* pygpo: Proper exception exit in py_ads_connect().Kristján Valur2019-03-071-17/+18
| | | | | | | | | connect() now succeeds or raises an exception. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson <kristjan@rvx.is> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* pygpo: Replace the use of SystemError with RuntimeError.Kristján Valur2019-03-071-12/+12
| | | | | | | | | SystemError is reserved for internal errors in the interpreter. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13822 Signed-off-by: Kristján Valur Jónsson <kristjan@rvx.is> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* utils:libgpo: re-add libgpo as library, it should not be part of gpextGünther Deschner2019-01-281-4/+11
| | | | | | | | | | | It was initially removed in 78fd02cf31dfe72d596030f342aebefba1e72263 but is needed by the inf file parsing. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Bjoern Jacke <bjacke@samba.org>
* libgpo: remove 404 link in commentDouglas Bagnall2019-01-281-1/+0
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: remove duplicate entry in value tableDouglas Bagnall2019-01-281-4/+0
| | | | | | | previously added a few lines up. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: Use C99 initializer for gp_extension_reg_tableAndreas Schneider2019-01-281-18/+69
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* Fix typos and ban the rams from sambatdb-1.3.17Swen Schillig2019-01-101-2/+2
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* libgpo: Use dom_sid_str_bufVolker Lendecke2018-12-111-4/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: Align integer typesVolker Lendecke2018-11-271-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: Use dom_sid_str_bufVolker Lendecke2018-11-271-3/+15
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: Make sure status is intializedAndreas Schneider2018-11-141-1/+1
| | | | | | | | | Found by cppcheck. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libgpo: Use dom_sid_str_bufVolker Lendecke2018-11-091-11/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Pass mem_ctx to cache_path()Volker Lendecke2018-08-171-1/+1
| | | | | | | | | | | Fix a confusing API: Many places TALLOC_FREE the path where it's not clear you have to do it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Aug 17 14:28:51 CEST 2018 on sn-devel-144
* pygpo: Fix a talloc_tos() leak in py_gpo_get_unix_pathVolker Lendecke2018-08-171-4/+3
| | | | | | | | | | | | | | cache_path() implicitly puts its result on talloc_tos(). As in py_gpo_get_unix_path the talloc_stackframe() is only created after the cache_path() call, we leak the result of cache_path() on talloc_tos() (which might or might not exist). This converts the function to the pattern used elsewhere: Create the stackframe as the very first action and remove it as the very last action in the function. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* 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>