1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

1798 Commits

Author SHA1 Message Date
Michael Adam
14c1e05165 s3:param: add lp_load_no_reinit()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:30 +02:00
Michael Adam
1f60ceedb8 s3:param: remove "add_ipc" parameter from lp_load_with_registry_shares().
This is not called from the server (which loads registry shares lazily),
so add_ipc is always false...

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:29 +02:00
Michael Adam
97e87681b3 s3:param: remove "global_only" parameter from lp_load_with_registry_shares().
There is no point in choosing global_only when forcing to load
all shares from registry at the same time...

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:29 +02:00
Michael Adam
df7677cf7d s3:param: let lp_load_global_no_reinit() call lp_load() instead of lp_load_ex()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:29 +02:00
Michael Adam
79f8fd94c5 s3:param: add wrapper lp_load_with_shares().
Most common pattern with shares, including IPC,
but not forcing immediate loading of all registry shares.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:29 +02:00
Michael Adam
8f2c5fd84f s3:param: let lp_load_global() call lp_load(), not lp_load_ex().
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-04-22 13:57:29 +02:00
Volker Lendecke
c51300ad89 lib: load_case_tables() -> smb_init_locale()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
Andrew Bartlett
65379ef3a4 param: Use IDL-based constants for NBT and NBT dgram ports
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Mar 16 05:35:56 CET 2015 on sn-devel-104
2015-03-16 05:35:55 +01:00
Robin McCorkell
13c9774662 MSDFS referral shuffling
Shuffle MSDFS referral list in smbd in accordance with [MS-DFSC] 3.2.1.1
When parsing an MSDFS symlink, the names are shuffled with a Fisher-Yates
algorithm.

Signed-off-by: Robin McCorkell <rmccorkell@karoshi.org.uk>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-02-27 22:53:06 +01:00
Jeremy Allison
44d2612822 s3:param: Add "smb2 leases" parameter. Default "false".
This is currently marked as experimental!

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:10 +01:00
David Disseldorp
f833052899 param: remove unused get_share_params()
Given a share name, get_share_params() returns corresponding snum inside
a struct share_params. find_service() provides duplicate functionality.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 26 21:27:21 CET 2014 on sn-devel-104
2014-11-26 21:27:21 +01:00
Stefan Metzmacher
bdba7a8bce s3:param: fix compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-25 07:25:44 +01:00
Volker Lendecke
66173dd987 param: add "smbd profiling level" option
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-19 20:51:37 +01:00
Jeremy Allison
b0a434386d s3:param: Add new option "strict rename".
Control whether smbd can rename directories containing
open files. Defaults to "no" (meaning we *can* do
such renames).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Michael Adam
594ffeedfc s3:loadparm: fix a comment typo
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2014-10-30 20:25:04 +01:00
Andrew Bartlett
14f6256c51 s3-winbindd: Allow winbindd to connect over SMB2 to servers
This allows SMB signing to work against many more DCs, and so improves network security.

The default for "client max protocol" remains NT1 in the rest of the code.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-08 01:09:51 +02:00
Andrew Bartlett
afe02d12f4 winbindd: Change value of "ldap sasl wrapping" to sign
This is to disrupt MITM attacks between us and our DC

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2014-09-30 12:32:05 +02:00
David Disseldorp
b19283c0f4 param: avoid dereferencing null lp_ctx
process_smbconf_service() calls lp_do_section() with a NULL userdata
(struct loadparm_context *) argument. Since 0864d4945, lp_do_section()
unconditionally attempts to set the lp_ctx->bInGlobalSection variable,
resulting in a segfault.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Aug 11 21:00:15 CEST 2014 on sn-devel-104
2014-08-11 21:00:15 +02:00
David Disseldorp
9d5fba18ab param: remove unimplemented find_service() check
Check for "default VFS service" is empty, and we don't currently provide
such a feature.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-08-11 18:38:12 +02:00
Michael Adam
b7f4b0ca00 s3:param: remove unused function lp_string_set()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-07-31 18:49:46 +02:00
Stefan Metzmacher
98426ad467 lib/param: change the default for "winbind expand groups" to "0"
Expanding groups requires the usage of SAMR, which is often not possible
with the trust account credentials. This has caused a lot of trouble
in the past, as this is the only operation which requires a member to
contact a dc of a trusted domain directly, which is not always possible.
With this changed default, it should only be required to contact
a dc of our own domain. This is the correct behavior for a domain member.

As expanding groups is mostly cosmetic, we should avoid it.
This is similar to "winbind enum users" and "winbind enum groups",
which are also off by default.

Only some broken applications calculate the group memberships of
users by traversing groups, such applications will require
"winbind expand groups = 1".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 31 18:48:36 CEST 2014 on sn-devel-104
2014-07-31 18:48:36 +02:00
Garming Sam
72642f1260 param: get rid of unnecessary get_default_loadparm_service pointer
Change-Id: I9f512be671e5cd738c43fd97c9c3e0b4ee7a2736
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
0693b5d77b param: remove unnecessary lp_do_parameter call
Change-Id: I0cd1842bac3fcb6dde7236b87d5d235f10277e60
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
47f10ac65c param: remove lp_get_parameter
Ensure lpcfg_parm_struct, its counterpart is equivalent

Change-Id: I127ce5d3cf7fe02ebf161aa011ec3b41bc32a656
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
0796dc6fe0 s3:param: move all lp context setup to a single function
Change-Id: Ife53e3946a4958d81cbe892bc554520561058c65
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
adeb284a7f s3:param: Ensure that the service pointers are not used directly.
Change-Id: I750301d80981546a84f17995883fae26398d17b8
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
71eb59200a param: remove init printer values from s3-helpers
Change-Id: I2c4a85b4f5039158924982a277be20ebc2d6302e
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
f605832d8e param: move init_printer_values to lib/param
Change-Id: I45df7d589c742d6e5572b0950daed563533cca3c
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
397a3ece0b param: change init_printer_values to take an lp ctx
Change-Id: I55cda94bbf1daf276ec0c45b056bd81645eaa25f
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
42f21ad65c param: remove unused dump_globals
Change-Id: Id55884c2809ada9c37a4ae306f3a09ecee0fe992
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
26a6f05f0f param: use lpcfg_dump_globals in s3 loadparm
Change-Id: I7f7f5238a47e0c3634757b74f3f852ce36988614
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
a7c4446bef param: remove is_default method in s3
Change-Id: Ia9c7422c5f7b56eb81ad644b369bfa36849e963e
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
a1d2e52110 param: remove unused service_ok function
Change-Id: I0736a3b9b73aa80f529327ec70e856dd7fc008c6
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
bc46178831 param: use lpcfg_service_ok in s3 loadparm
Change-Id: Ic157d3f5ec7ac9a72db86239e76cd743149cb8e0
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:11 +02:00
Garming Sam
611a402cee s3:param: remove lp_string_set from the s3_fns.
This is not used any more.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:10 +02:00
Garming Sam
3377c0f8a4 s3:param: add lp_ctx as a parameter to init_globals
Change-Id: I8804923241d782eb82675c5a56d53b5ba720fdf0
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:10 +02:00
Garming Sam
0864d4945e s3:param: use lpcfg_do_*_paramter instead of lp_do_parameter in do_parameter
Change-Id: I08ab5d9db9323a2ef4fa2243ff0b0b7efe73a23b
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:10 +02:00
Garming Sam
4fa98737f4 s3:param: simplify lp_do_parameter to use lpcfg functions
Change-Id: I907794fbbc15ecc4e88e0f6b0d510788e0fca745
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-07-31 08:17:10 +02:00
Michael Adam
27b0d9740e s3:param: move a variable into scope in lp_file_list_changed
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jul 30 15:59:11 CEST 2014 on sn-devel-104
2014-07-30 15:59:11 +02:00
Jeremy Allison
2535803627 s3: winbindd: Add new parameter "winbind request timeout" set to 60 seconds with man page.
"This parameter specifies the number of seconds the winbindd
daemon will wait before disconnecting either a client connection
with no outstanding requests (idle) or a client connection with a
request that has remained outstanding (hung) for longer than this
number of seconds."

Bug 3204 winbindd: Exceeding 200 client connections, no idle connection found

https://bugzilla.samba.org/show_bug.cgi?id=3204

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2014-07-29 21:08:12 +02:00
Garming Sam
0eacbb6c96 param: change snum parameter in special functions to a loadparm_service pointer
Using either an snum or the current service for special functions
depending where it was called is unnecessary and complicates the process
of handling them generically.

idmap parameters now call lpcfg_do_parameter_parametric and are now set
like normal.

Change-Id: I3eca89791274280f9d3c7b987fbd790c16ec7981
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
9f519cabfa s3:param: pass down lp_ctx in handle include
Currently the lp_ctx will never actually be used as it will still go
through the current s3 code.

Change-Id: Iff236aea79b2294deb8faf175c7425d075a0f4c4
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
8947af1bd2 param: Use set_variable instead of set_variable_helper in lp_do_parameter
This extends the usage of the temporary s3 context in lp_do_parameter
to beyond the special functions.

At least for now, this will be necessary for sorting out the
differences between the do_parameter code.

Change-Id: Iac380d11a927e466ab1a56d34cebe343c3608707
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
21d5c667d8 param: add failure case for loadparm_init_s3
It allocates memory, so it should be possible for it to fail.

Change-Id: Ib24f9718fb88790de23b78435866b9e79fe8c705
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
86284815fa param: store the flags_list in the s3 lp context used for special
Special function needs the flag list.

Change-Id: I3c2f118704026913021e4399e89cc3583de9a743
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
c76a8a1ba5 param: mark non default options using flags in s3
This change allows lib/param code to see which s3 parameters are
currently set to defaults.

Change-Id: Ic25b3f8e792a6d72705a7e5d7159ac8f87e18512
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
edc321df7f param: fix FLAG_CMDLINE to be stored outside of the param table
In s3, flags could only be stored once in the param table and this was
global. The param table defines only the default flags however.

Change-Id: Ie673ad60dd499d930432c106e795e2cbd42d497b
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
124140f5d0 param: remove unnecessary dump a service
Change-Id: I59b4edf929b4f8338e4c1a7116e0d1ef1bcad287
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
e1c50d9542 param: simplify lp_do_parameter
No longer checks for globals vs service twice.

Change-Id: I065e732ddb1ca2dda63dd22e3caf291fce8d327b
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-07-07 23:32:36 +02:00
Garming Sam
39fb65e54c param: replace lp_set_cmdline in s3 helpers to store_cmdline
Change-Id: I9a6ac66eeb8e0dd9ba356f5201f7ac09784b476d
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-07-07 23:32:36 +02:00