summaryrefslogtreecommitdiff
path: root/source3/wscript_build
Commit message (Collapse)AuthorAgeFilesLines
* Build registry parsing code into subsystemMichael Hanselmann2019-10-181-0/+1
| | | | | | | | | | Fuzzing code will make use of the "reg_parse_fd" function. By building it into the "SMBREGISTRY" subsystem it can just be linked and "reg_parse.c" doesn't need to be explicitly included. Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* s3:tests: Add smbspool test for CUPS-like "sanitized" Device URI in argv[0]Bryan Mason2019-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | Before calling a backend like smbspool, CUPS will set argv[0] to the "sanitized" Device URI (the Device URI with username/password information removed). These changes are intended to catch problems with smbspool that may be created by this behavior (like https://bugzilla.samba.org/show_bug.cgi?id=14128). source3/script/tests/smbspool_argv_wrapper.c: added to emulate CUPS-like behavior by setting argv[0] to the device URI before exec()ing smbspool. source3/script/tests/test_smbspool.sh: updated to use smbspool_argv_wrapper to test the CUPS-like behavior described above. Signed-off-by: Bryan Mason <bmason@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Oct 16 10:55:04 UTC 2019 on sn-devel-184
* s3:mdssvc: add unit tests for the Spotlight to Elasticsearch parserRalph Boehme2019-10-091-0/+18
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* s3:mdssvc: add Elasticsearch backendRalph Boehme2019-10-091-0/+10
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* s3: add mdscli Python bindingsRalph Boehme2019-10-091-0/+5
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* s3:rpc_client: add a mdssvc client libraryRalph Boehme2019-10-091-0/+7
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* messaging: Do POOL_USAGE via a socketVolker Lendecke2019-09-181-1/+1
| | | | | | | | | | | | | This makes debugging run-away processes much more efficient and even possible at all: If the pool-usage output is more than 256MB, the previous code could not realloc it and threw it away. Also, it is not helpful for an already huge process to allocate even more. 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 Sep 18 21:27:30 UTC 2019 on sn-devel-184
* s3-librpc: Remove unused init_netr_CryptPassword()Andrew Bartlett2019-08-211-5/+0
| | | | | | | Unused since 38d4dba37406515181e4d6f1a1faffc18e652e27 in 2013 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:mdssvc: new option "spotlight backend"Ralph Boehme2019-08-081-1/+1
| | | | | | | | Currently there's only the tracker backend, but subsequent commits will add other backends. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpc_client: Use init_samr_CryptPassword in cli_samr rpc_clientAndreas Schneider2019-07-261-1/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:{modules => lib}/string_replace.[c|h]Ralph Boehme2019-07-121-0/+3
| | | | | | | This is now also consumed by something outside source3/modules/. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:lib: move Mac streams util functions to s3/libRalph Boehme2019-07-121-0/+1
| | | | | | | | | | | | While at it, change the functions to work on the stream name directly instead of struct smb_filename. A later commit wants to use the function on the resulting stream names coming from vfs_streaminfo(). Also use the simple string compare version, not the multibyte ones, as the afp* stream names are simple ASCII string, so there's no need to become fancy. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_fruit: move AppleDouble functionality to a dedicated subsystemRalph Boehme2019-07-121-0/+4
| | | | | | | | | It's still tied to the VFS, therefor it lives in source3/modules/. Reduces code bloat in vfs_fruit and makes it possible to use it from other parts of the codebase in future. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Move fcb_or_dos_open() out of open_file_ntcreate()Volker Lendecke2019-07-081-0/+1
| | | | | | | | | | | | | | This is SMB1-only and pre-ntcreate with only 3 callers that look at NTCREATEX_OPTIONS_PRIVATE_DENY_[DOS|FCB]. It is a bit less efficient if it kicks in (we have to recreate the fsp), but SMB1 is less and less popular, and this particular share mode combination from the open&x family of calls might not be worth optimizing for. This adds smb1_utils.[ch] as a kitchen sink for functions that can go away once we drop SMB1. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:rpc_client: Use C99 inititializer in dcerpc_samr_chgpasswd_user()Andreas Schneider2019-06-271-1/+1
| | | | | | | This also cleans up after using them. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/crypto: move gnutls error wrapper to own subsystemAndrew Bartlett2019-06-271-0/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:client: Link smbspool_krb5_wrapper against krb5sambaAndreas Schneider2019-06-181-1/+1
| | | | | | | | | | | | | Heimdal doesn't provide krb5_free_unparsed_name(), so we need to use the function we provide in krb5samba. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jun 18 18:10:40 UTC 2019 on sn-devel-184
* s3:smbspool: Fallback to default ccache if KRB5CCNAME is not setAndreas Schneider2019-05-231-0/+1
| | | | | | | | | This could also support the new KCM credential cache storage. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib: Remove "tdb based replacement for gettext"Andrew Bartlett2019-05-221-1/+0
| | | | | | | This is unused since SWAT was removed in Samba 4.1 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* build: Remove build of replacetortAndrew Bartlett2019-05-061-5/+0
| | | | | | | | This is built close to the code it tests in lib/replace/wscript_build as replace_testsuite. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* s3/lib: tevent-glib-glue test utiltity with TrackerRalph Boehme2019-04-241-0/+10
| | | | | | | | | A small utilitly useful for tesing the tevent_glib_glue code. It runs a tracker-sparql search query against your local tracker store that must be setup and running. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* s3/lib: add a tevent_glib_glue subsystem testRalph Boehme2019-04-241-0/+10
| | | | | | | Tests adapted from glib2 glib/tests/mainloop.c. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* s3/lib: new tevent_glib_glue subsystemRalph Boehme2019-04-241-0/+6
| | | | | | | | | | | tevent_glib_glue_create() takes glib GMainContext and adds its event sources to a tevent context. tevent will poll the sources and run handlers for pending events as detailed in the glib documentation: https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* utils: Move conn_tdb.c to utils/Volker Lendecke2019-04-121-1/+0
| | | | | | | | | | That's a wrapper that only smbstatus and net status use by now. 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): Fri Apr 12 00:37:05 UTC 2019 on sn-devel-144
* build: Move smbstatus definition to source3/utils/wscript_buildVolker Lendecke2019-04-111-19/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* CVE-2019-3880 s3: rpc: winreg: Remove implementations of SaveKey/RestoreKey.Jeremy Allison2019-04-081-4/+0
| | | | | | | | | | | | | | Remove the now unused code implementations of registry file io. As reported by Michael Hanselmann. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13851 Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Apr 8 11:43:31 UTC 2019 on sn-devel-144
* build: Remove bld.gen_python_environments()Andrew Bartlett2019-03-211-7/+5
| | | | | | | This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* build: Remove --extra-pythonAndrew Bartlett2019-03-211-2/+0
| | | | | | | | | | | This option is quite invasive in waf and was mainly for the python3 transition. Testing with multiple python versions can be done by testing a full compile against multiple versions, likewise multiple different binding versions can be created the same way. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* regfio: Add trivial unit testMichael Hanselmann2019-03-201-0/+6
| | | | | | | | | | | An upcoming commit will resolve two cases of insufficient handling of mangled registry hive files and will include unit tests. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13840 Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* passdb: Increase ABI version to 0.28.0Christof Schmitt2019-03-071-1/+1
| | | | | | | | | | | | | | The change from c906153cc lib: Remove some unused code removed functions, but only updated the minor version of the ABI. Update the passdb version to 0.28.0 to reflect this change. file. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Mar 7 01:30:49 UTC 2019 on sn-devel-144
* lib: Use wrapper for string to integer conversionSwen Schillig2019-03-011-0/+2
| | | | | | | | | | | | In order to detect an value overflow error during the string to integer conversion with strtoul/strtoull, the errno variable must be set to zero before the execution and checked after the conversion is performed. This is achieved by using the wrapper function strtoul_err and strtoull_err. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove some unused codeVolker Lendecke2019-02-281-3/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Feb 28 13:53:41 UTC 2019 on sn-devel-144
* torture: Add tests for idmap cacheVolker Lendecke2019-02-281-0/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813
* add sysquotas_jfs2.cBjoern Jacke2019-02-171-0/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* waf: Check for libnscdChristof Schmitt2019-02-131-0/+1
| | | | | | | | | | | | | | The check was in the old autoconf, but not in waf. As the code is still in source3/lib/util_nscd.c, add the check for libnscd to allow building and using the code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13787 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Feb 13 17:58:33 CET 2019 on sn-devel-144
* s3:util: Move popen wrappers to lib/utilAliaksei Karaliou2019-02-111-1/+0
| | | | | | | | | | | | When linked into Samba3 libraries, sys_popen()/sys_pclose() cannot be used in lower level libraries because of circular dependencies. This patch moves them into common samba-util library. Signed-off-by: Aliaksei Karaliou <akaraliou@panasas.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:lib: add per_thread_cwd_{check,supported,disable,activate}() helper functionsStefan Metzmacher2019-01-111-0/+1
| | | | | | | | | Only Linux it's possible to have a per thread current working directory using unshare(CLONE_FS). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:libsmb: Revert SMB Py bindings name back to libsmb_samba_internalTim Beale2019-01-091-1/+1
| | | | | | | | | | | | | | | | | | In order to make it clear that the APIs in these Python bindings are unstable and should not be used by external consumers, this patch changes the name of the Python bindings back to libsmb_samba_internal. To make the Python code that uses these bindings (i.e. samba-tool, etc) look a little cleaner, we can just change the module name as we import it, e.g. from samba.samba3 import libsmb_samba_internal as libsmb Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jan 9 14:30:31 CET 2019 on sn-devel-144
* s3:pylibsmb: Rename libsmb_samba_internal Py bindings to libsmbTim Beale2019-01-071-1/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* selftest: Test hide new files timeoutVolker Lendecke2018-11-091-0/+1
| | | | | | | | 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): Fri Nov 9 03:49:55 CET 2018 on sn-devel-144
* s3:lib: Rename server_contexts to global_contextsChristof Schmitt2018-09-071-1/+1
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:smbstatus: Use cmdline_messaging_contextChristof Schmitt2018-09-071-0/+1
| | | | | | | | | | Use cmdline_messaging_context to initialize a messaging context instead of open coding the same steps. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:popt_common: use cmdline_messaging_context() in ↵Ralph Boehme2018-09-071-1/+1
| | | | | | | | | | | | | | | popt_common_credentials_callback() This adds a call to cmdline_messaging_context() to the popt popt_common_credentials_callback() hook and ensures that any client tool that uses POPT_COMMON_CREDENTIALS gets an implicit messaging context, ensuring it doesn't crash in the subsequent lp_load_client() with include=registry in a cluster. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:lib: Introduce cmdline context wrapperChristof Schmitt2018-09-071-0/+5
| | | | | | | | | | | | | | Command line tools need acccess to the same messaging context provided by server_messaging_context, as common code for db_open uses that context. We want to have additional checking for command line tools without having that code part of the servers. Introduce a wrapper library to use for command line tools with the additional checks, that then acquires the server_messaging_context. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:lib: Move popt_common_credentials to separate fileChristof Schmitt2018-09-071-2/+7
| | | | | | | | | | | This is only used by command line utilities and has additional dependencies. Move to a separate file to contain the dependencies to the command line tools. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* source3/wscript: update to handle waf 2.0.4Alexander Bokovoy2018-09-051-3/+0
| | | | | Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* examples: Add winexe re-implemented on current Samba libsVolker Lendecke2018-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | winexe from https://sourceforge.net/projects/winexe/ is a project based on Samba libraries from 2012. According to the winexe git repository the last Samba commit winexe was updated to is 47bbf9886f0c from November 6, 2012. As winexe uses unpublished Samba internal libraries, it broke over time. This is a port of the winexe functionality to more modern Samba versions. It still uses internal APIs, but it being part of the tree means that it is much easier to keep up to date. The Windows service files were taken literally from the original winexe from the sourceforge git. Andrzej Hajda chose GPLv3 only and not GPLv3+. As GPL evolves very slowly, this should not be a practical problem for quite some time. To build it under Linux, you need mingw binaries on your build system. Under Debian stretch, the package names are gcc-mingw-w64 and friends. 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): Tue Aug 28 02:03:07 CEST 2018 on sn-devel-144
* s3/smbd: smb2 server implementation for query get/set info.Noel Power2018-07-311-0/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/libsmb: adjust smb1 cli code to use idl structs and ndr push/pull funcs.Noel Power2018-07-311-0/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbd: SGI IRIX is officially dead. Remove the kernel oplock code for IRIX.Jeremy Allison2018-07-251-1/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>