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

1880 Commits

Author SHA1 Message Date
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
Garming Sam
288e29b7a9 param: set the flags on a s3 loadparm context
By setting up the flags when we initialize the context, the flags can be
accessed by lib/param at any time.

Change-Id: I60d4f3a9108560e204cf5f37da9c7d995939e146
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
090fb5a517 param: flag fixes in s3 loadparm
In s3 loadparm, the flags are stored in the param table, while in
lib/param, it is individual to a loadparm context.

Change-Id: I23d72eeec6b935c1897b34b8fc49d5a9992f2993
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
2d9b3020fa param: attempt to start factoring out the bInGlobalSection parameter
Eventually this parameter should be solely on the loadparm context. It
should really only have meaning during the globals init.

Change-Id: If0fd2037ce4e8399fbf00f63bc138d9c146d7570
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
5a17187583 param: add do_section to s3 helpers
Change-Id: Ib9cee580f46fcb6d5046e606b4bfbf9e68dab76a
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
acc7f79ee4 param: rename do_section in s3 to lp_do_section to avoid conflicts
Change-Id: I9bb090b3b501a1e958eec17988901baed16c58cb
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
5c0ce80726 param: remove unnecessary calls to do_parameter in s3
This aim of this is to try to factor out do_parameter.

Ideally, do_parameter should strictly be called from pm_process.

Change-Id: I990b53d0884e828f523a3b40e4ca72cc1596b06c
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
ee722f48c4 param: remove unnecessary lp_local_ptr_by_snum function
The function only appears twice and it can be easily inlined without
any real loss to meaning or readability.

Change-Id: Iabf6d202cedd95ad4f223e89c7d3be8dfbe36389
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
bdbafe51da param: move defaults_saved global out of dump_globals function
Removes an unnecessary dependency on a global variable.

Change-Id: I87fc63190a3b8ceba5fb5606fa0e7d5e1f2633a4
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:35 +02:00
Garming Sam
f1c28fcc23 param: use set_variable_helper in s3 loadparm
Change-Id: I1ed19ee7290f6b52f624e2aa700cf402cfcb255d
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:35 +02:00
Garming Sam
5b5e3ec403 param: finish the set_param_helper lineup by rearranging case order
Attempting to make the code match exactly before moving it over.

Change-Id: If05fccd11d245176b5793e59d1b92317b25fd2c8
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:35 +02:00
Garming Sam
bc810eed11 param: make some more changes to lp_do_parameter to match set_variable_helper
Attempting to make the code match exactly before moving it over.

Change-Id: Ie7a30d5477f3fbf95f8f43e1ac1f76b581d87709
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:35 +02:00
Garming Sam
f47df32fd1 param: attempt to align the set_variable_helper with lp_do_parameter
This should allow some of it to be factored out into lib/param.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
Change-Id: I7d0b3b4114c73aeaf9bf63e8c5fcd0a9d00cfc00
2014-07-07 23:32:35 +02:00
Garming Sam
72651f92f0 param: pre-emptively correct use of str_list_make_v3 in lib/param
lib/param uses str_list_make, while, s3 uses str_list_make_v3. These
differ slightly and should be made the same.

Notably it returns NULL when given a null or empty string

Also, includes the null check in s3 code to be consistent for merging
this section of code later on.

Change-Id: Ib543a5a5307e06989621ea16bfe87e315d66a7ef
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:35 +02:00
Garming Sam
eda92c7a3d param: Use the plus/minus syntax for reading in lists in s3 loadparm
This changes the behaviour the following parameters:
server services, dcerpc endpoint servers and ntvfs handler

These parameters were introduced with samba4 and are the parameters
which should utilize the newer list syntax. This allows merging
between the setting of parameters.

Change-Id: Id6226b5bede5cd4908f6718bd1b799faf881927d
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:35 +02:00
Garming Sam
d6486cf0d2 param: ensure CMD_LIST is freed when freeing a parameter
As well as correctly deallocating the memory, this prevents a potential bug
where s3 globals struct may be freed, but it can be referred to
elsewhere.

Change-Id: I92fc9baa26aee5b4a35b767bed901928cbb7c74f
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:35 +02:00
Andrew Bartlett
f3710320ce s4-winbind: Use winbindd in the AD DC by default
(Including changes to knownfail to match the new winbindd in use in each environment)

Change-Id: I9e08086eba98e95e05a99afef28315e2857aae56
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul  4 05:19:54 CEST 2014 on sn-devel-104
2014-07-04 05:19:54 +02:00
Andrew Bartlett
191d754091 s3-param: Add lp_dnsdomain() for use by winbindd
Change-Id: I987aa533ebe11c93b9e836fafc7b19c81bf600a5
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-04 03:22:26 +02:00
Andrew Bartlett
5a71f46f46 winbindd: Use rpc_pipe_open_interface() so that winbindd uses the correct rpc servers
This means that in the AD DC, we use the AD DC servers, while in the classic DC or file server we continue
to use the built-in SAMR and LSA servers.

Andrew Bartlett

Change-Id: I63b1443f5665016f7fcbed35907ec29d4424ab18
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-04 03:22:26 +02:00
Andrew Bartlett
7736c96935 param: Use an explicit talloc_stackframe() in lp_load_ex for clarity and certainty
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May  7 22:14:21 CEST 2014 on sn-devel-104
2014-05-07 22:14:21 +02:00
Andrew Bartlett
9fdcf7888b param: Use an explicit talloc_stackframe() in lp_do_parameter for clarity and certainty.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:18 +02:00
Garming Sam
f4d090f145 param: correctly return false when parsing invalid octal in lp_do_parameter
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
dfc999ef90 lib/param: remove unnecessary get_parametric s3 helper function
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
886e44f159 param: remove unused get_parametrics_by_service
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
9d90969a37 param: copy parametric option helper to lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
66338032c2 param: tidy up get_parametrics_by_service
Reorders the search to check the service first, then check the globals
if it fails, or if none is specified, for better clarity.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Andrew Bartlett
b93ed0a73b param: Provide a talloc_stackframe() to external users of lp_set_cmdline()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
dc08cfacc9 param: refactor lp_set_cmdline_helper to not call store_lp_set_cmdline
Currently worthless without a shared do_parameter.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
48a6624ddd param: fix incorrect return on lp_set_cmdline_helper
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Andrew Bartlett
3d6a0270e4 lib/param: Make and use lpcfg_dump_a_service() in common
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
978b815f8c param: remove NUMPARAMETERS macro in s3
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
a900fa09ec param: move parametric parameter dumping to lpcfg_dump_a_parameter
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
8363106d9a param: remove fstring from dump_a_parameter
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
671d13fbd8 s3:loadparm: Fix dump a parameter to use the file indicated
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:17 +02:00
Garming Sam
ad09b3e608 param: correctly use param_table.c as a regular C file
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
db19d74479 param: use a single special handler for idmap parameters
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
84ed1853eb param: add lp_do_parameter to s3 helpers
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
1189724ec4 param: use a single handle_netbios_aliases function
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
c03b8eba51 param: include set_netbios_aliases in s3 helpers
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
f4d7f12986 param: have a single handle_ldap_debug_level function
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
64eb985457 param: include init_ldap_debugging in the s3 helpers
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
dce3bcd00f param: move handle printing into lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
74e0a37fd3 param: setup more variables in for the temporary loadparm context for the special functions
In doing so, the loadparm context definition is now also moved to the loadparm.h header.

This means that the loadparm context is no longer private to the
lib/param code and that the source3 code can now override the values
within it.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
509cc45c95 param: add extra default parameter to get_parametrics_by_service
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
d7973e1c38 param: make init_printer_values use lpcfg functions
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
a540792257 param: move lp_set_enum_parm to lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
005bf97da6 param: change lp_set_enum_parm to indicate whether or not it fails
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
7505ddf134 param: remove duplicate lp_bool function
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
8204345b93 param: remove duplicate lp_ulong function
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
45184c9758 param: remove duplicate lp_int function
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <abartlet@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
f6697ef8da param: use a single handle_include function between the two loadparms
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
3845138731 param: remove unused lp_set_option
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
e547e83fd3 param: move special charset handlers to lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
58e8163be5 param: inline init_iconv into handle [dos] charset
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:16 +02:00
Garming Sam
1a92113812 param: add getservicebyname to s3_helpers
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
47c431279e param: use a single init_copymap method in lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
07f01b19c6 param: prevent an existing segmentation fault with setting [dos] charset
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
b64ac37936 param: move the declaration of the file_lists structure to a shared header
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
61103e1a46 param: use a single add_to_file_list method
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
7be7a81821 s3:param: change add_to_file_list to stop using global variables
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
f2e03d8bab param: remove unused lp_copy_service
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
ef3d445d88 param: consolidate handle_copy method between the two loadparms
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
2f47965ba9 s3:param: avoid the use the global variable iServiceIndex in handle_copy
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
6f8b2ab54f param: use a single copy_service function in lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
c8b499b342 param: duplicate the copy service in lib/param into source3 loadparm
Change-Id: I9ddd9ba9c05ab226a335d261554dd1587f7e59fc
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
8670f63731 param: improve copy_service to use the correct talloc parents
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
706ad2091e param: remove unused init_service
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
7ea3441a8c s3:param: remove the double initialization in add_a_service
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
ab1030a9a2 param: remove instance of lp_parm_ptr to be consistent with lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
9bac9a83ac s3:param: attempt to fix up some const warnings
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
be0851f754 param: move set_param_opt to lib/param
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/109
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
5a9cef48df param: use correct memory contexts for parametric options
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/107
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:15 +02:00
Garming Sam
4a86b693fd param: remove lp_string_is_valid_boolean
This call is never made in the code and should in fact crash if it was ever called with a valid boolean

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/106
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
29cdb716d0 param: consolidate handle_realm between the two loadparms
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/105
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
a39d569336 param: attempt to consolidate handle_logfile between the two loadparms
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/104
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
e06acfadd0 param: change assignment of lp_string in s3_helpers to be consistent with the other functions
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/103
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
3892086589 param: attempt to consolidate handle_debug_level between the two loadparms
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/102
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
84b98a2ce5 param: allow special functions to be common across the two loadparms
Currently, each of the functions are declared in both and redefined using macros
when they are unused. This change should allow only a single function to exist.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/101
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
c1c1f09c18 param: Add an lp_string_set function
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/100
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
7c92cf30a5 s3:loadparm: fix intermediate string allocations to use talloc
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
e812b726cd param: change the talloc context attached to globals structure in s3 loadparm to a pool
With many allocations being made, with many empty strings in loadparm, it should be more
effective to use a talloc pool instead of a normal talloc context.

The numbers chosen are based around a simple testparm instance.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/157
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
2dd7c89079 param: remove string_init and inline it into string_set
In making this change, the special case has been removed for empty strings.

The use of empty strings causes various issues with trying to mix s4 and s3 code.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/156
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
a81279c8e0 s3:loadparm: change memory allocations to use talloc
(talloc memory paternity fix to handle_debug_list() and
lp_parm_const_string_service() added by abartlet)

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Garming Sam
294dd73d18 param: remove unnecessary temporary service in handle copy
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-07 19:49:14 +02:00
Andrew Bartlett
9d5f4cabf3 lib/param: Add new parameter "old password allowed period"
Change-Id: I46228b492ba71ba4f3fee380a1ccadb328e3ade1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-02 17:12:47 +02:00
Stefan Metzmacher
24054b5f8b s3:param: move lp_ctdbd_socket() to ctdbd_conn.c
This allows us to use CTDB_PATH only in ctdbd_conn.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-03-24 17:09:10 +01:00
Stefan Metzmacher
74f8c3568a s3:param: avoid using BUFFER_SIZE to limit the lp_min_receive_file_size()
There's really no reason to add such limit.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-05 10:06:24 -08:00
Garming Sam
8246e53bb6 param: remove lp_dnsdomain from s3
With the use of the shared globals structure, lp_dnsdomain is no longer used in the code and removing it would remove a notable special case

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I59526c40c58e132a134d67fa7944dfeacd05f4c6
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-20 10:11:24 +13:00
Garming Sam
a7d2f9a08e param: change s3_param.h from a generated file to a static one
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I131e37ec92f7a826caec382023915c5e4b4c52be
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-20 10:11:20 +13:00
Garming Sam
0941789063 param: remove generated loadparm ctx table file and include it directly
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I5f1d42e3ae6495accf7a711938cc28c03ab2cd62
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-20 10:11:17 +13:00
Garming Sam
9780113846 param: use loadparm_globals struct instead of lp function pointers in s3_helpers
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I4507cdbf111b7f9dca3ca18ee2bf242ffdfeb4e7
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
2014-02-20 10:11:13 +13:00
Garming Sam
8c22634559 param: Move LOADPARM_EXTRA_GLOBALS to lib/param/loadparm.h to be shared between loadparms
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:14 +13:00
Garming Sam
89ff7b0d85 param: remove special cases for tls files
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:14 +13:00
Garming Sam
2bf17a9d75 param: use generate_param.py to generate loadparm_ctx_table.c
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:14 +13:00
Garming Sam
5cab9f16d0 param: use generate_param.py to generate s3_param.h
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:14 +13:00
Garming Sam
b1de1abf7b param: use generate_param.py to generate param_global.h
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Andrew Bartlett
0c7ed5a8ab param: No longer have a special case for lp_configfile
This parameter is renamed because it does not normally return the current smb.conf file, but
instead returns the next one, as found in a config file = directive, to be loaded.

This avoids a conflict with the lpcfg_configfile from lib/param, which does refer to the
current smb.conf path.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Garming Sam
526cf3c119 param: use generate_param.py to generate param_proto.h
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Andrew Bartlett
4ea7318e56 lib/param: Remove special handling for 'state dir' and 'cache dir'
The build system gives these two parameters different defaults
(compared with lock dir) in both the --enable-fhs and default mode, so
the logic to use lock dir no longer applies unless the build has been
very specially constructed.

Therefore, remove the special case handling and make these normal
parameters again.

Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Andrew Bartlett
86850860f8 lib/param: Normalise "read raw" and "write raw" parameters
They have been changed to function like normal parameters,
removing a special case in the loadparm system.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Garming Sam
aea623e050 param: auto generate param_functions.c at build time
generate_param.py reads the documentation to define which functions need to
be generated.

To add new parameters, edit the xml files in docs-xml/smbdotconf.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-02-12 13:17:13 +13:00
Andrew Bartlett
907f49ef1f lib/param: Mark source code generators as group build_source
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 10 05:56:58 CET 2014 on sn-devel-104
2014-02-10 05:56:58 +01:00
Garming Sam
98e8126b05 param: rename and move log level from LOADPARM_EXTRA_GLOBALS to param_functions.c
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-02-10 15:26:44 +13:00
Garming Sam
a416edfe3a param: rename and move usershare template parameter from LOADPARM_EXTRA_GLOBALS to param_functions.c
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-02-10 15:26:44 +13:00
Garming Sam
a3979677a8 param: rename lp function and variable from "nis_home_map" to "nis_homedir"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb  8 03:31:34 CET 2014 on sn-devel-104
2014-02-08 03:31:34 +01:00
Garming Sam
61d4af550a param: rename lp function and variable from "syncalways" to "sync_always"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:16 -08:00
Garming Sam
52b1b168b3 param: rename lp function and variable from "minprintspace" to "min_print_space"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:16 -08:00
Garming Sam
e3052c5bd9 param: rename lp function and variable from "writelist" to "write_list"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:16 -08:00
Garming Sam
7cdcf131e8 param: rename lp function and variable from "usernamelevel" to "username_level"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:16 -08:00
Garming Sam
8256cb5a37 param: rename lp function and variable from "readlist" to "read_list"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:16 -08:00
Garming Sam
c81c75d263 param: rename lp function and variable from "onlyuser" to "only_user"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Garming Sam
51f8a24d26 param: rename lp function and variable from "inherit_perms" to "inherit_permissions"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Garming Sam
63598ff628 param: rename lp function and variable from "encrypted_passwords" to "encrypt_passwords"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Garming Sam
fc111c7875 param: rename lp function and variable from "srv_minprotocol" to "server_min_protocol"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Garming Sam
64dc4b59f8 param: rename lp function and variable from "srv_maxprotocol" to "server_max_protocol"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Garming Sam
57d407430f param: rename lp function and variable from "maxmux" to "max_mux"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Garming Sam
5be5acb736 param: rename lp function and variable from "cli_minprotocol" to "client_min_protocol"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Garming Sam
f548585051 param: rename lp function and variable from "cli_maxprotocol" to "client_max_protocol"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Garming Sam
4e4dbc9aea param: rename lp function and variable from "ms_add_printer_wizard" to "show_add_printer_wizard"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00