summaryrefslogtreecommitdiff
path: root/source3/param
Commit message (Collapse)AuthorAgeFilesLines
* s4-dns: Deprecate BIND9_FLATFILE and remove "rndc command"Andrew Bartlett2019-08-221-2/+0
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Aug 22 21:24:00 UTC 2019 on sn-devel-184
* loadparm: fix mem leak found by ASANSwen Schillig2019-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ==24948==ERROR: LeakSanitizer: detected memory leaks Indirect leak of 232 byte(s) in 1 object(s) allocated from: #0 0x7fc44b971c08 in __interceptor_malloc (/lib64/libasan.so.5+0xefc08) #1 0x7fc44a2fe7b0 in __talloc_with_prefix ../../lib/talloc/talloc.c:782 #2 0x7fc44a2fe7b0 in __talloc ../../lib/talloc/talloc.c:824 #3 0x7fc44a2fe7b0 in _talloc_named_const ../../lib/talloc/talloc.c:981 #4 0x7fc44a2fe7b0 in _talloc_array ../../lib/talloc/talloc.c:2764 #5 0x7fc44a1239bc in str_list_make_v3 ../../lib/util/util_strlist_v3.c:58 #6 0x7fc44a123e3b in str_list_make_v3_const ../../lib/util/util_strlist_v3.c:127 #7 0x7fc44b14cc1a in init_globals ../../source3/param/loadparm.c:547 #8 0x7fc44b14deef in lp_load_ex ../../source3/param/loadparm.c:3876 #9 0x7fc44b14f97c in lp_load_initial_only ../../source3/param/loadparm.c:4025 #10 0x7fc44b479235 in cmdline_messaging_context ../../source3/lib/cmdline_contexts.c:34 #11 0x557cf59d642c in process_options ../../source3/utils/smbpasswd.c:200 #12 0x557cf59d642c in main ../../source3/utils/smbpasswd.c:633 #13 0x7fc4419f5412 in __libc_start_main (/lib64/libc.so.6+0x24412) Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Aug 10 20:42:39 UTC 2019 on sn-devel-184
* s3:mdssvc: add noindex backendRalph Boehme2019-08-081-1/+1
| | | | | | | | | | | | | | Add a new default backend that, while allowing mdsvc RPC and search queries from clients, always returns no results. Shares using this backend will behave the same way as shares on a macOS SMB server where indexing is disabled. This change will later also allow us to compile the Spotlight RPC service by default which is a big step in the direction of adding tests to CI. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:mdssvc: new option "spotlight backend"Ralph Boehme2019-08-081-0/+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/param: clang: Fix 'Value stored to 'bRetval' is never read'Noel Power2019-07-161-3/+0
| | | | | | | | | | | | | | | Fixes: source3/param/loadparm.c:2770:2: warning: Value stored to 'bRetval' is never read <--[clang] bRetval = false; ^ ~~~~~ source3/param/loadparm.c:3868:2: warning: Value stored to 'bRetval' is never read <--[clang] bRetval = false; ^ ~~~~~ 2 warnings generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* docs/xml: change default for "mangled names" to "illegal"Ralph Boehme2019-07-081-1/+1
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* docs-xml: change "client min protocol" to SMB2_02Stefan Metzmacher2019-07-081-1/+1
| | | | | | | It's time to disable SMB1 by default... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* docs-xml: change "server min protocol" to SMB2_02Stefan Metzmacher2019-07-081-1/+1
| | | | | | | | SMB2_02 was available with Windows Vista. It's time to turn SMB1 off by default. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* param: change default of "allocation roundup size" to 0Björn Jacke2019-07-071-1/+0
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:loadparm: Ensure to truncate FS Volume Label at multibyte boundaryShyamsunder Rathi2019-05-161-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | For FS_VOLUME_INFO/FS_INFO operation, a maximum of 32 characters are sent back. However, since Samba chops off any share name with >32 bytes at 32, it is possible that a multi-byte share name can get chopped off between a full character. This causes the string decoding for unicode failure which sends back NT_STATUS_ILLEGAL_CHARACTER (EILSEQ) to the client applications. On Windows, Notepad doesn't like it, and refuses to open a file in this case and fails with the following error: Invalid character. For multibyte character sets, only the leading byte is included without the trailing byte. For Unicode character sets, include the characters 0xFFFF and 0xFFFE. Proposed fix: - Find the last starting point of a multibyte codepoint if the character at 32nd byte is a subsequent byte of a MB codepoint. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13947 Signed-off-by: Shyamsunder Rathi <shyam.rathi@nutanix.com> Reviewed-by: Hemanth Thummala <hemanth.thummala@nutanix.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: squash 'cast between incompatible function types' warningNoel Power2019-05-161-1/+1
| | | | | | | | | | | | | Some functions (e.g. py_smb_savefile) have an extra unecessary *kwargs param in their signatures, these definitions are causing 'cast between incompatible function types' warnings when compiled with -Wcast-function-type. Some other functions have the *kwargs which causes "cast between incompatible function types' warnings which need to be squashed with use of the PY_DISCARD_FUNC_SIG macro. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* smbd: Move deadtime default to parameter definition and man pageChristof Schmitt2019-05-011-1/+1
| | | | | | | | | | The code has a default of one week (10080 minutes) if the parameter is set to 0. Make this the public default of the parameter, instead of hiding it in the code. This change also has the code match the documentation that setting this parameter to 0 disables the check. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* memcache: Increase size of default memcache to 512kChristof Schmitt2019-04-061-1/+1
| | | | | | | | | | | With the fixed accounting of talloc objects, the default cache size needs to increase. The exact increase required depends on the workloads, going form 256k to 512k seems like a reasonable guess. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13865 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: Remove bld.gen_python_environments()Andrew Bartlett2019-03-211-3/+2
| | | | | | | This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* web_server: Remove the web port smb.conf parameterGarming Sam2019-03-071-2/+0
| | | | | | | | With the removal of the web server, there are not any users of this parameter and so should just be removed. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:param: Use C99 initializer for poptOption in test_lp_loadAndreas Schneider2019-01-281-2/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* docs-xml: add "smbd getinfo ask sharemode"Ralph Boehme2018-12-061-0/+1
| | | | | | | Counterpart for "smbd search ask sharemode" for getinfo. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* docs-xml: add "smbd search ask sharemode"Ralph Boehme2018-12-061-0/+1
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: Make sure we do not export "/" (root) as home dirAndreas Schneider2018-12-051-1/+5
| | | | | | | | | If "/" (root) is returned as the home directory, prevent exporting it. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13699 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: Remove unsused MMAP_BLACKLIST ifdef checksAndreas Schneider2018-11-281-4/+0
| | | | | | | This doesn't get defined by anything. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* source4 smbd prefork: Add backoff to process restartGary Lockyer2018-11-231-0/+2
| | | | | | | | | Add new smbd.conf variables 'prefork backoff increment' and 'prefork maximum backoff' to control the rate at which failed pre-forked processes are restarted. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* source4 smbd prefork: Increase default worklers to 4Gary Lockyer2018-11-071-1/+1
| | | | | | | | Increase the default number of worker processes started by the pre-fork process model from 1 to 4. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:loadparm: reinit_globals in lp_load_with_registry_shares()Ralph Boehme2018-09-071-1/+1
| | | | | | | | | | | | | | | | This was set to false in 0e0d77519c27038b30fec92d542198e97be767d9 based on the assumption that callers would have no need to call lp_load_initial_only() with a later call to lp_load_something(). This is not quite correct, since for accessing registry config on a cluster with include=registry, we need messaging up and running which *itself* requires loadparm to be initialized to get the statedir, lockdir asf. directories. 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>
* smb.conf: add dns_zone_scavengingGary Lockyer2018-07-121-0/+1
| | | | | | | | | Add parameter dns_zone_scavenging to control dns zone scavenging. Scavenging is disabled by default, as due to https://bugzilla.samba.org/show_bug.cgi?id=12451 the ageing properties of existing DNS entries are incorrect. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
* s3/loadparm: fix a few talloc stackframe leaksDavid Disseldorp2018-07-061-5/+8
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* samba_gpoupdate: Rename the command to samba-gpupdateDavid Mulder2018-07-041-1/+1
| | | | | | | | | On a Windows client, this command is called 'gpupdate' Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: fileserver: Change defaults to work with EA support out of the box.Jeremy Allison2018-05-151-3/+3
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue May 15 12:40:48 CEST 2018 on sn-devel-144
* wscript_build: fix c modules deps name for Python 3Joe Guo2018-04-051-1/+2
| | | | | | | | | | 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>
* python3 port for param moduleNoel Power2018-04-052-7/+18
| | | | | | 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>
* s3:param: Fix size typesAndreas Schneider2018-03-201-2/+2
| | | | | | | This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3/smbd: fix handling of delete-on-close on directoriesRalph Boehme2018-02-031-0/+1
| | | | | | | | | | | | | | | | | | This implements a check to test the delete-on-close flag of a directory for requests to create files in this directory. Windows server implement this check, Samba doesn't as it has performance implications. This commit implements the check and a new option to control it. By default the check is skipped, setting "check parent directory delete on close = yes" enables it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Feb 3 23:42:16 CET 2018 on sn-devel-144
* gpo: Add the winbind call to gpupdateDavid Mulder2018-01-131-0/+2
| | | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* winbindd: add "winbind scan trusted domains = no" to avoid trust enumerationStefan Metzmacher2018-01-131-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* docs-xml: deprecate "server schannel" and change the default to "yes"Stefan Metzmacher2018-01-101-1/+1
| | | | | | | | No client should use the old protocol without DCERPC level integrity/privacy, but Maybe there're some lagacy OEM file servers, which require this. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* docs-xml: deprecate "client schannel" and change the default to "yes"Stefan Metzmacher2018-01-101-1/+1
| | | | | | | | This is already the default, because "require strong key = yes" is the default. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* docs-xml: remove deprecated 'use spnego" optionStefan Metzmacher2018-01-101-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* docs-xml: remove deprecated of 'winbind trusted domains only' optionStefan Metzmacher2018-01-101-1/+0
| | | | | | | This parameter is already deprecated in favor of the newer idmap_nss backend. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* docs-xml: remove deprecated 'profile acls' optionStefan Metzmacher2017-12-131-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* docs-xml: remove unused "map untrusted to domain" optionStefan Metzmacher2017-12-131-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: Enable async I/O by defaultVolker Lendecke2017-12-121-2/+2
| | | | | | | | We've had this code in for long enough that we should enable it by default. Modern clients do overlapping I/O, we should utilize that if possible. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3/loadparm: don't mark IPC$ as autoloadedRalph Boehme2017-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A related problem that affects configuration for the hidden IPC$ share. This share is marked a "autoloaded" and such shares are not reloaded when requested. That resulted in the tcon to IPC$ still using encrpytion after running the following sequence of changes: 1. stop Samba 2. set [global] smb encrypt = required 3. start Samba 4. remove [global] smb encrypt = required 5. smbcontrol smbd reload-config 6a bin/smbclient -U slow%x //localhost/raw -c quit, or 6b bin/smbclient -U slow%x -mNT1 //localhost/raw -c ls In 6a the client simply encrypted packets on the IPC$ tcon. In 6b the client got a tcon failure with NT_STATUS_ACCESS_DENIED, but silently ignore the error. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13051 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Nov 28 02:02:37 CET 2017 on sn-devel-144
* s3/loadparm: ensure default service options are not changedRalph Boehme2017-11-271-2/+9
| | | | | | | | | | | | | | Rename sDefault to _sDefault and make it const. sDefault is make a copy of _sDefault in in the initialisation function lp_load_ex(). As we may end up in setup_lp_context() without going through lp_load_ex(), sDefault may still be uninitialized at that point, so I'm initializing lp_ctx->sDefault from _sDefault. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13051 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/loadparm: allocate a fresh sDefault object per lp_ctxRalph Boehme2017-11-271-1/+8
| | | | | | | | | | | | | | This is in preperation of preventing direct access to sDefault in all places that currently modify it. As currently s3/loadparm is afaict not accessing lp_ctx->sDefault, but changes sDefault indirectly through lp_parm_ptr() this change is just a safety measure to prevent future breakage. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13051 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gpo: Create the gpo update serviceGarming Sam2017-11-201-0/+7
| | | | | | | | | | | | 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> Signed-off-by: David Mulder <dmulder@suse.com> Then adapted to current master Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* source4/smbd: add a prefork process model.Gary Lockyer2017-10-191-0/+1
| | | | | | | | | | | | | | | | Add a pre fork process model to bound the number processes forked by samba. Currently workers are only pre-forked for the ldap server, all the other services have pre-fork support disabled. When pre-fork support is disabled a new process is started for each service, and requests are processed by that process. This commit partially reverts commit b5be45c453bd51373bade26c29828b500ba586ec. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* Removed unused 'oplock contention limit' config parameterChristof Schmitt2017-10-191-1/+0
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: Add 'binddns dir' parameterAndreas Schneider2017-09-051-0/+2
| | | | | | | | | | This allows to us to have restricted access to the directory by the group 'named' which bind is a member of. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12957 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
* param: Disable LanMan authentication unless NTLMv1 is also enabledAndrew Bartlett2017-07-041-1/+17
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11923
* auth: Allow NTLMv1 if MSV1_0_ALLOW_MSVCHAPV2 is given and re-factor 'ntlm ↵Andrew Bartlett2017-07-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | auth =' The ntlm auth parameter is expanded to more clearly describe the role of each option, and to allow the new mode that permits MSCHAPv2 (as declared by the client over the NETLOGON protocol) while still banning NTLMv1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12252 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Based on a patch by Mantas Mikulėnas <mantas@utenos-kolegija.lt>: Commit 0b500d413c5b ("Added MSV1_0_ALLOW_MSVCHAPV2 flag to ntlm_auth") added the --allow-mschapv2 option, but didn't implement checking for it server-side. This implements such checking. Additionally, Samba now disables NTLMv1 authentication by default for security reasons. To avoid having to re-enable it globally, 'ntlm auth' becomes an enum and a new setting is added to allow only MSCHAPv2. Signed-off-by: Mantas Mikulėnas <mantas@utenos-kolegija.lt> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* param: change the effective default for "client max protocol" to the latest ↵Stefan Metzmacher2017-06-271-1/+1
| | | | | | | | | supported protocol Currently it's SMB3_11. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>