The branch, master has been updated via 218d397 param: change share backend to use a constant string via f38b1db param: change fstype to use a constant string via 8c22634 param: Move LOADPARM_EXTRA_GLOBALS to lib/param/loadparm.h to be shared between loadparms via 6e954a5 param: move SMB2 defaults to lib/param and use in loadparm_init via 89ff7b0d param: remove special cases for tls files via 2bf17a9 param: use generate_param.py to generate loadparm_ctx_table.c via 5cab9f1 param: use generate_param.py to generate s3_param.h via ac16049 param: use generate_param.py to generate param_local.h via b1de1ab param: use generate_param.py to generate param_global.h via 0c7ed5a param: No longer have a special case for lp_configfile via cc6a778 lib/param: generate the param_functions.h containing the prototypes via 526cf3c param: use generate_param.py to generate param_proto.h via a29d885 lib/param: explicitly use mode=FUNCTIONS when running generate_param.py via 66c2fbf lib/param: update generate_param.py to generate more of loadparm via 4ea7318 lib/param: Remove special handling for 'state dir' and 'cache dir' via 8685086 lib/param: Normalise "read raw" and "write raw" parameters via aea623e param: auto generate param_functions.c at build time via a7d4185 build: don't execute tests/summary.c via 30cc8f4 s3: vfs_dirsort module. via fd79652 s3: vfs_dirsort module. from da9b3c1 s4:rpc_server/epmapper: make use of dcerpc_binding_dup() in build_ep_list()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 218d3976a5dc54f302a38818c7c07f4fd3b2b290 Author: Garming Sam <garm...@catalyst.net.nz> Date: Fri Jan 17 10:10:48 2014 +1300 param: change share backend to use a constant string Substitution is not necessary for this parameter. Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Wed Feb 12 03:17:39 CET 2014 on sn-devel-104 commit f38b1dbbe5c68b25fe414d8cd57144bde8cb5704 Author: Garming Sam <garm...@catalyst.net.nz> Date: Thu Jan 16 15:58:31 2014 +1300 param: change fstype to use a constant string Substitution isn't really necessary for this parameter. Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 8c22634559820fee9d2007816174263fafc41c6a Author: Garming Sam <garm...@catalyst.net.nz> Date: Thu Jan 16 13:44:22 2014 +1300 param: Move LOADPARM_EXTRA_GLOBALS to lib/param/loadparm.h to be shared between loadparms Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 6e954a560521a459ef4a72faeca39b16ca0fed36 Author: Garming Sam <garm...@catalyst.net.nz> Date: Thu Jan 16 13:32:42 2014 +1300 param: move SMB2 defaults to lib/param and use in loadparm_init Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 89ff7b0d851a971a8bdca7f9ff2200db61be4e03 Author: Garming Sam <garm...@catalyst.net.nz> Date: Thu Jan 16 13:13:11 2014 +1300 param: remove special cases for tls files Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 2bf17a9d75fed68dd41c770ea9e0c284599f1a82 Author: Garming Sam <garm...@catalyst.net.nz> Date: Wed Jan 15 17:55:56 2014 +1300 param: use generate_param.py to generate loadparm_ctx_table.c Pair-programmed-with: Andrew Bartlett <abart...@samba.org> Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 5cab9f16d069f72fadfb710f16065f3816782df9 Author: Garming Sam <garm...@catalyst.net.nz> Date: Wed Jan 15 17:52:41 2014 +1300 param: use generate_param.py to generate s3_param.h Pair-programmed-with: Andrew Bartlett <abart...@samba.org> Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit ac16049f7419b97bcfe91c1312feec38694fffb3 Author: Garming Sam <garm...@catalyst.net.nz> Date: Wed Jan 15 17:45:46 2014 +1300 param: use generate_param.py to generate param_local.h Pair-programmed-with: Andrew Bartlett <abart...@samba.org> Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit b1de1abf7bf3de70faa279bd0617f48434d550e2 Author: Garming Sam <garm...@catalyst.net.nz> Date: Wed Jan 15 17:39:48 2014 +1300 param: use generate_param.py to generate param_global.h Pair-programmed-with: Andrew Bartlett <abart...@samba.org> Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 0c7ed5a8ab99aa2a5c9c40e3cea8ce1e58cfe30c Author: Andrew Bartlett <abart...@samba.org> Date: Wed Jan 15 17:29:57 2014 +1300 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 <abart...@samba.org> Reviewed-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Michael Adam <ob...@samba.org> commit cc6a77835bc286b2e570a05596b3b6acc54c1052 Author: Garming Sam <garm...@catalyst.net.nz> Date: Wed Jan 15 17:18:13 2014 +1300 lib/param: generate the param_functions.h containing the prototypes Pair-programmed-with: Andrew Bartlett <abart...@samba.org> Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 526cf3c119cae83d94d9120ef436482281daaeb4 Author: Garming Sam <garm...@catalyst.net.nz> Date: Wed Jan 15 17:05:51 2014 +1300 param: use generate_param.py to generate param_proto.h Pair-programmed-with: Andrew Bartlett <abart...@samba.org> Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit a29d885cb633d9c39a944d6153c2570a5590308c Author: Garming Sam <garm...@catalyst.net.nz> Date: Wed Jan 15 16:54:29 2014 +1300 lib/param: explicitly use mode=FUNCTIONS when running generate_param.py Pair-programmed-with: Andrew Bartlett <abart...@samba.org> Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 66c2fbf2a1d996831bd12a2e0fbd7d90e4e4ba62 Author: Garming Sam <garm...@catalyst.net.nz> Date: Wed Jan 15 16:49:50 2014 +1300 lib/param: update generate_param.py to generate more of loadparm These files can now be generated directly from the xml rather than from param_functions.c Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 4ea7318e562f21eaf913555b5e85dc556305346f Author: Andrew Bartlett <abart...@samba.org> Date: Wed Jan 15 15:59:54 2014 +1300 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 <garm...@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 86850860f871700da02000f5b7af374563134344 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Jan 15 14:48:40 2014 +1300 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 <abart...@samba.org> Reviewed-by: Garming Sam <garm...@catalyst.net.nz> Reviewed-by: Michael Adam <ob...@samba.org> commit aea623e050530ad79c47e590373ad8241eb3914d Author: Garming Sam <garm...@catalyst.net.nz> Date: Tue Jan 14 17:53:49 2014 +1300 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 <garm...@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit a7d4185bb8cf7d4d71c07b9f1fdb42d948aa22c0 Author: Gustavo Zacarias <gust...@zacarias.com.ar> Date: Thu Jan 30 17:59:48 2014 -0300 build: don't execute tests/summary.c tests/summary.c will never be able to be executed when cross compiling. Use #error and #warning directives to fail or warn accordingly when compiling it. Signed-off-by: Gustavo Zacarias <gust...@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Kamen Mazdrashki <kame...@samba.org> commit 30cc8f41da58b87ff575860b7cde640520829923 Author: Jeremy Allison <j...@samba.org> Date: Tue Feb 11 10:39:04 2014 -0800 s3: vfs_dirsort module. Add raw.search torture test on a share definition with: vfs objects = dirsort https://bugzilla.samba.org/show_bug.cgi?id=10406 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit fd79652b0e598882e0c4d156bd897c29dae8ec04 Author: Jeremy Allison <j...@samba.org> Date: Wed Jan 29 17:01:30 2014 -0800 s3: vfs_dirsort module. Allow dirsort to work when multiple simultaneous directories are open. The old code only keeps one active private data pointer on the connection struct, opening a second directory on the same connection will overwrite it. This modification turns the private data pointer into a linked list of open directories on the connection struct, and finds the correct one by searching on the passed in DIR *. With this code in place, smbd passes raw.search torture test on a share definition with: vfs objects = dirsort https://bugzilla.samba.org/show_bug.cgi?id=10406 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: docs-xml/smbdotconf/base/sharebackend.xml | 1 + docs-xml/smbdotconf/misc/cachedirectory.xml | 2 +- docs-xml/smbdotconf/misc/configfile.xml | 2 +- docs-xml/smbdotconf/misc/fstype.xml | 1 + docs-xml/smbdotconf/misc/statedirectory.xml | 2 +- docs-xml/smbdotconf/protocol/readraw.xml | 9 +- docs-xml/smbdotconf/protocol/writeraw.xml | 20 +- docs-xml/smbdotconf/security/tlscafile.xml | 3 +- docs-xml/smbdotconf/security/tlscertfile.xml | 3 +- docs-xml/smbdotconf/security/tlscrlfile.xml | 3 +- docs-xml/smbdotconf/security/tlsdhparamsfile.xml | 3 +- docs-xml/smbdotconf/security/tlskeyfile.xml | 3 +- lib/param/README | 4 +- lib/param/loadparm.c | 49 +-- lib/param/loadparm.h | 23 ++ lib/param/param.h | 5 +- lib/param/param_functions.c | 416 ---------------------- lib/param/param_table.c | 20 +- lib/param/util.c | 4 +- lib/param/wscript_build | 37 ++- script/generate_param.py | 348 ++++++++++++++++++ script/mkparamdefs.pl | 206 ----------- script/mks3param.pl | 193 ---------- script/mks3param_ctx_table.pl | 139 ------- script/mks3param_proto.pl | 199 ----------- selftest/target/Samba3.pm | 4 + source3/include/local.h | 5 - source3/include/proto.h | 8 +- source3/lib/util.c | 4 +- source3/modules/vfs_dirsort.c | 119 ++++++- source3/nmbd/nmbd.c | 2 +- source3/param/loadparm.c | 87 +---- source3/param/wscript_build | 16 +- source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 2 +- source3/selftest/tests.py | 5 + source3/smbd/lanman.c | 2 +- source3/smbd/negprot.c | 16 +- source3/smbd/reply.c | 2 +- source3/smbd/server_reload.c | 2 +- source3/smbd/service.c | 4 +- source3/smbd/trans2.c | 4 +- source3/utils/testparm.c | 12 +- source3/winbindd/winbindd.c | 2 +- source3/wscript_build | 2 +- source4/script/mkproto.pl | 41 --- source4/smb_server/smb/negprot.c | 29 ++- tests/summary.c | 14 +- wscript | 1 - wscript_build | 2 +- 49 files changed, 663 insertions(+), 1417 deletions(-) delete mode 100644 lib/param/param_functions.c create mode 100644 script/generate_param.py delete mode 100644 script/mkparamdefs.pl delete mode 100644 script/mks3param.pl delete mode 100644 script/mks3param_ctx_table.pl delete mode 100644 script/mks3param_proto.pl Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/base/sharebackend.xml b/docs-xml/smbdotconf/base/sharebackend.xml index 4da8b17..fc8b6d4 100644 --- a/docs-xml/smbdotconf/base/sharebackend.xml +++ b/docs-xml/smbdotconf/base/sharebackend.xml @@ -1,6 +1,7 @@ <samba:parameter name="share backend" context="G" type="string" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para> diff --git a/docs-xml/smbdotconf/misc/cachedirectory.xml b/docs-xml/smbdotconf/misc/cachedirectory.xml index 03f4c62..e72d852 100644 --- a/docs-xml/smbdotconf/misc/cachedirectory.xml +++ b/docs-xml/smbdotconf/misc/cachedirectory.xml @@ -2,7 +2,7 @@ context="G" advanced="1" developer="1" type="string" - generated_function="0" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para>Usually, most of the TDB files are stored in the <parameter diff --git a/docs-xml/smbdotconf/misc/configfile.xml b/docs-xml/smbdotconf/misc/configfile.xml index 755a43d..abbc80c 100644 --- a/docs-xml/smbdotconf/misc/configfile.xml +++ b/docs-xml/smbdotconf/misc/configfile.xml @@ -2,7 +2,7 @@ context="G" type="string" hide="1" - generated_function="0" + function="next_configfile" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para>This allows you to override the config file diff --git a/docs-xml/smbdotconf/misc/fstype.xml b/docs-xml/smbdotconf/misc/fstype.xml index c7df18c..d210c10 100644 --- a/docs-xml/smbdotconf/misc/fstype.xml +++ b/docs-xml/smbdotconf/misc/fstype.xml @@ -1,6 +1,7 @@ <samba:parameter name="fstype" context="S" type="string" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para> diff --git a/docs-xml/smbdotconf/misc/statedirectory.xml b/docs-xml/smbdotconf/misc/statedirectory.xml index 029797e..1079868 100644 --- a/docs-xml/smbdotconf/misc/statedirectory.xml +++ b/docs-xml/smbdotconf/misc/statedirectory.xml @@ -2,7 +2,7 @@ context="G" advanced="1" developer="1" type="string" - generated_function="0" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para>Usually, most of the TDB files are stored in the diff --git a/docs-xml/smbdotconf/protocol/readraw.xml b/docs-xml/smbdotconf/protocol/readraw.xml index 3ff250c..fb54cc0 100644 --- a/docs-xml/smbdotconf/protocol/readraw.xml +++ b/docs-xml/smbdotconf/protocol/readraw.xml @@ -2,15 +2,13 @@ context="G" type="boolean" developer="1" - generated_function="0" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> - <para>This parameter controls whether or not the server - will support the raw read SMB requests when transferring data - to clients.</para> + <para>This is ignored if <smbconfoption name="async echo handler"/> is set, + because this feature is incompatible with raw read SMB requests</para> <para>If enabled, raw reads allow reads of 65535 bytes in - one packet. This typically provides a major performance benefit. + one packet. This typically provides a major performance benefit for some very, very old clients. </para> <para>However, some clients either negotiate the allowable @@ -24,4 +22,5 @@ <value type="default">yes</value> <related>write raw</related> +<related>async echo handler</related> </samba:parameter> diff --git a/docs-xml/smbdotconf/protocol/writeraw.xml b/docs-xml/smbdotconf/protocol/writeraw.xml index 963803f..fb9e386 100644 --- a/docs-xml/smbdotconf/protocol/writeraw.xml +++ b/docs-xml/smbdotconf/protocol/writeraw.xml @@ -2,13 +2,25 @@ context="G" type="boolean" developer="1" - generated_function="0" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> - <para>This parameter controls whether or not the server - will support raw write SMB's when transferring data from clients. - You should never need to change this parameter.</para> + <para>This is ignored if <smbconfoption name="async echo handler"/> is set, + because this feature is incompatible with raw write SMB requests</para> + + <para>If enabled, raw writes allow writes of 65535 bytes in + one packet. This typically provides a major performance benefit for some very, very old clients. + </para> + + <para>However, some clients either negotiate the allowable + block size incorrectly or are incapable of supporting larger block + sizes, and for these clients you may need to disable raw writes.</para> + +<para>In general this parameter should be viewed as a system tuning + tool and left severely alone.</para> </description> <value type="default">yes</value> + +<related>read raw</related> +<related>async echo handler</related> </samba:parameter> diff --git a/docs-xml/smbdotconf/security/tlscafile.xml b/docs-xml/smbdotconf/security/tlscafile.xml index 0a54e99..889dd23 100644 --- a/docs-xml/smbdotconf/security/tlscafile.xml +++ b/docs-xml/smbdotconf/security/tlscafile.xml @@ -2,7 +2,8 @@ type="string" context="G" basic="1" advanced="1" developer="1" - generated_function="0" + function="_tls_cafile" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para>This option can be set to a file (PEM format) diff --git a/docs-xml/smbdotconf/security/tlscertfile.xml b/docs-xml/smbdotconf/security/tlscertfile.xml index 0365554..df5fb5f 100644 --- a/docs-xml/smbdotconf/security/tlscertfile.xml +++ b/docs-xml/smbdotconf/security/tlscertfile.xml @@ -2,7 +2,8 @@ type="string" context="G" basic="1" advanced="1" developer="1" - generated_function="0" + function="_tls_certfile" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para>This option can be set to a file (PEM format) diff --git a/docs-xml/smbdotconf/security/tlscrlfile.xml b/docs-xml/smbdotconf/security/tlscrlfile.xml index 659a3d5..4c9de35 100644 --- a/docs-xml/smbdotconf/security/tlscrlfile.xml +++ b/docs-xml/smbdotconf/security/tlscrlfile.xml @@ -2,7 +2,8 @@ type="string" context="G" basic="1" advanced="1" developer="1" - generated_function="0" + function="_tls_crlfile" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para>This option can be set to a file containing a certificate diff --git a/docs-xml/smbdotconf/security/tlsdhparamsfile.xml b/docs-xml/smbdotconf/security/tlsdhparamsfile.xml index b248a34..b965b1e 100644 --- a/docs-xml/smbdotconf/security/tlsdhparamsfile.xml +++ b/docs-xml/smbdotconf/security/tlsdhparamsfile.xml @@ -2,7 +2,8 @@ type="string" context="G" basic="1" advanced="1" developer="1" - generated_function="0" + function="_tls_dhpfile" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para>This option can be set to a file with Diffie-Hellman parameters diff --git a/docs-xml/smbdotconf/security/tlskeyfile.xml b/docs-xml/smbdotconf/security/tlskeyfile.xml index 6cf7bd7..a1c7be3 100644 --- a/docs-xml/smbdotconf/security/tlskeyfile.xml +++ b/docs-xml/smbdotconf/security/tlskeyfile.xml @@ -2,7 +2,8 @@ type="string" context="G" basic="1" advanced="1" developer="1" - generated_function="0" + function="_tls_keyfile" + constant="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <description> <para>This option can be set to a file (PEM format) diff --git a/lib/param/README b/lib/param/README index b567d71..e0b590a 100644 --- a/lib/param/README +++ b/lib/param/README @@ -11,8 +11,8 @@ Adding a parameter ------------------ To add or change an smb.conf option, you only have to modify -lib/param/param_table.c and lib/param/param_functions.c. The rest is -generated for you. +lib/param/param_table.c and add the documentation to docs-xml/smbdotconf. +The rest is generated for you. Using smb.conf parameters in the code diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index d3bd85c..1d5ae9e 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -72,29 +72,6 @@ static bool do_parameter(const char *, const char *, void *); static bool defaults_saved = false; -#define LOADPARM_EXTRA_GLOBALS \ - struct parmlist_entry *param_opt; \ - char *realm_original; \ - char *szConfigFile; \ - int iminreceivefile; \ - char *szPrintcapname; \ - int CupsEncrypt; \ - int iPreferredMaster; \ - char *szLdapMachineSuffix; \ - char *szLdapUserSuffix; \ - char *szLdapIdmapSuffix; \ - char *szLdapGroupSuffix; \ - char *szIdmapUID; \ - char *szIdmapGID; \ - char *szIdmapBackend; \ - int winbindMaxDomainConnections; \ - int ismb2_max_credits; \ - char *tls_keyfile; \ - char *tls_certfile; \ - char *tls_cafile; \ - char *tls_crlfile; \ - char *tls_dhpfile; - #include "lib/param/param_global.h" #define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct)) @@ -318,11 +295,9 @@ static struct loadparm_context *global_loadparm_context; #include "lib/param/param_functions.c" -/* These functions remain only in lib/param for now */ -FN_GLOBAL_BOOL(readraw, bReadRaw) -FN_GLOBAL_BOOL(writeraw, bWriteRaw) -FN_GLOBAL_CONST_STRING(cachedir, szCacheDir) -FN_GLOBAL_CONST_STRING(statedir, szStateDir) +/* These functions cannot be auto-generated */ +FN_LOCAL_BOOL(autoloaded, autoloaded) +FN_GLOBAL_CONST_STRING(dnsdomain, dnsdomain) /* local prototypes */ static struct loadparm_service *getservicebyname(struct loadparm_context *lp_ctx, @@ -2214,7 +2189,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) lpcfg_do_global_parameter(lp_ctx, "enable privileges", "True"); - lpcfg_do_global_parameter(lp_ctx, "smb2 max write", "1048576"); + lpcfg_do_global_parameter_var(lp_ctx, "smb2 max write", "%u", DEFAULT_SMB2_MAX_WRITE); lpcfg_do_global_parameter(lp_ctx, "passdb backend", "tdbsam"); @@ -2224,7 +2199,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) lpcfg_do_global_parameter(lp_ctx, "mangled names", "True"); - lpcfg_do_global_parameter(lp_ctx, "smb2 max credits", "8192"); + lpcfg_do_global_parameter_var(lp_ctx, "smb2 max credits", "%u", DEFAULT_SMB2_MAX_CREDITS); lpcfg_do_global_parameter(lp_ctx, "ldap ssl", "start tls"); @@ -2312,9 +2287,9 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) lpcfg_do_global_parameter(lp_ctx, "lpq cache time", "30"); - lpcfg_do_global_parameter(lp_ctx, "smb2 max trans", "1048576"); + lpcfg_do_global_parameter_var(lp_ctx, "smb2 max trans", "%u", DEFAULT_SMB2_MAX_TRANSACT); - lpcfg_do_global_parameter(lp_ctx, "smb2 max read", "1048576"); + lpcfg_do_global_parameter_var(lp_ctx, "smb2 max read", "%u", DEFAULT_SMB2_MAX_READ); lpcfg_do_global_parameter(lp_ctx, "durable handles", "yes"); @@ -2713,27 +2688,27 @@ _PUBLIC_ void reload_charcnv(struct loadparm_context *lp_ctx) _PUBLIC_ char *lpcfg_tls_keyfile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) { - return lpcfg_private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_keyfile); + return lpcfg_private_path(mem_ctx, lp_ctx, lpcfg__tls_keyfile(lp_ctx)); } _PUBLIC_ char *lpcfg_tls_certfile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) { - return lpcfg_private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_certfile); + return lpcfg_private_path(mem_ctx, lp_ctx, lpcfg__tls_certfile(lp_ctx)); } _PUBLIC_ char *lpcfg_tls_cafile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) { - return lpcfg_private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_cafile); + return lpcfg_private_path(mem_ctx, lp_ctx, lpcfg__tls_cafile(lp_ctx)); } _PUBLIC_ char *lpcfg_tls_crlfile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) { - return lpcfg_private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_crlfile); + return lpcfg_private_path(mem_ctx, lp_ctx, lpcfg__tls_crlfile(lp_ctx)); } _PUBLIC_ char *lpcfg_tls_dhpfile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) { - return lpcfg_private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_dhpfile); + return lpcfg_private_path(mem_ctx, lp_ctx, lpcfg__tls_dhpfile(lp_ctx)); } struct gensec_settings *lpcfg_gensec_settings(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h index fffdee2..8a04b3f 100644 --- a/lib/param/loadparm.h +++ b/lib/param/loadparm.h @@ -208,6 +208,12 @@ enum case_handling {CASE_LOWER,CASE_UPPER}; #define GUEST_ACCOUNT "nobody" #endif +/* SMB2 defaults */ +#define DEFAULT_SMB2_MAX_READ (1024*1024) +#define DEFAULT_SMB2_MAX_WRITE (1024*1024) +#define DEFAULT_SMB2_MAX_TRANSACT (1024*1024) +#define DEFAULT_SMB2_MAX_CREDITS 8192 + #define LOADPARM_EXTRA_LOCALS \ bool valid; \ int usershare; \ @@ -224,6 +230,23 @@ enum case_handling {CASE_LOWER,CASE_UPPER}; #include "lib/param/param_local.h" +#define LOADPARM_EXTRA_GLOBALS \ + struct parmlist_entry *param_opt; \ + char *realm_original; \ + int iminreceivefile; \ + char *szPrintcapname; \ + int CupsEncrypt; \ + int iPreferredMaster; \ + char *szLdapMachineSuffix; \ + char *szLdapUserSuffix; \ + char *szLdapIdmapSuffix; \ + char *szLdapGroupSuffix; \ + char *szIdmapUID; \ + char *szIdmapGID; \ + char *szIdmapBackend; \ + int winbindMaxDomainConnections; \ + int ismb2_max_credits; + const char* server_role_str(uint32_t role); int lp_find_server_role(int server_role, int security, int domain_logons, int domain_master); int lp_find_security(int server_role, int security); diff --git a/lib/param/param.h b/lib/param/param.h index 77c3c77..428a2a3 100644 --- a/lib/param/param.h +++ b/lib/param/param.h @@ -49,6 +49,7 @@ struct gensec_settings; #ifdef CONFIG_H_IS_FROM_SAMBA #include "lib/param/param_proto.h" +#include "lib/param/param_functions.h" #endif const char **lpcfg_interfaces(struct loadparm_context *); @@ -61,7 +62,7 @@ int lpcfg_allow_dns_updates(struct loadparm_context *); void reload_charcnv(struct loadparm_context *lp_ctx); struct loadparm_service *lpcfg_default_service(struct loadparm_context *lp_ctx); - +bool lpcfg_autoloaded(struct loadparm_service *, struct loadparm_service *); char *lpcfg_tls_keyfile(TALLOC_CTX *mem_ctx, struct loadparm_context *); char *lpcfg_tls_certfile(TALLOC_CTX *mem_ctx, struct loadparm_context *); @@ -69,6 +70,8 @@ char *lpcfg_tls_cafile(TALLOC_CTX *mem_ctx, struct loadparm_context *); char *lpcfg_tls_dhpfile(TALLOC_CTX *mem_ctx, struct loadparm_context *); char *lpcfg_tls_crlfile(TALLOC_CTX *mem_ctx, struct loadparm_context *); +const char *lpcfg_dnsdomain(struct loadparm_context *); + const char *lpcfg_servicename(const struct loadparm_service *service); diff --git a/lib/param/param_functions.c b/lib/param/param_functions.c deleted file mode 100644 index 5c94114..0000000 --- a/lib/param/param_functions.c +++ /dev/null @@ -1,416 +0,0 @@ -/* - Unix SMB/CIFS implementation. - Parameter loading functions - Copyright (C) Karl Auer 1993-1998 - - Largely re-written by Andrew Tridgell, September 1994 - - Copyright (C) Simo Sorce 2001 - Copyright (C) Alexander Bokovoy 2002 - Copyright (C) Stefan (metze) Metzmacher 2002 - Copyright (C) Jim McDonough <j...@us.ibm.com> 2003 - Copyright (C) Michael Adam 2008 - Copyright (C) Jelmer Vernooij <jel...@samba.org> 2007 - Copyright (C) Andrew Bartlett 2011 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -FN_LOCAL_STRING(path, path) -FN_LOCAL_LIST(hosts_allow, hosts_allow) -FN_LOCAL_LIST(hosts_deny, hosts_deny) -FN_LOCAL_STRING(fstype, fstype) -FN_LOCAL_LIST(ntvfs_handler, ntvfs_handler) -FN_LOCAL_BOOL(msdfs_root, msdfs_root) -FN_LOCAL_BOOL(browseable, browseable) -FN_LOCAL_BOOL(read_only, read_only) -FN_LOCAL_BOOL(printable, printable) -FN_LOCAL_BOOL(map_hidden, map_hidden) -FN_LOCAL_BOOL(map_archive, map_archive) -FN_LOCAL_BOOL(oplocks, oplocks) -FN_LOCAL_BOOL(strict_sync, strict_sync) -FN_LOCAL_BOOL(map_system, map_system) -FN_LOCAL_INTEGER(max_connections, max_connections) -FN_LOCAL_INTEGER(csc_policy, csc_policy) -FN_LOCAL_INTEGER(create_mask, create_mask) -FN_LOCAL_INTEGER(force_create_mode, force_create_mode) -FN_LOCAL_INTEGER(directory_mask, directory_mask) -FN_LOCAL_INTEGER(force_directory_mode, force_directory_mode) -FN_LOCAL_STRING(preexec, preexec) -FN_LOCAL_STRING(postexec, postexec) -FN_LOCAL_STRING(root_preexec, root_preexec) -FN_LOCAL_STRING(root_postexec, root_postexec) -FN_LOCAL_STRING(dont_descend, dont_descend) -FN_LOCAL_STRING(username, username) -FN_LOCAL_LIST(invalid_users, invalid_users) -FN_LOCAL_LIST(valid_users, valid_users) -FN_LOCAL_LIST(admin_users, admin_users) -FN_LOCAL_STRING(print_command, print_command) -FN_LOCAL_STRING(lpq_command, lpq_command) -FN_LOCAL_STRING(lprm_command, lprm_command) -FN_LOCAL_STRING(lppause_command, lppause_command) -FN_LOCAL_STRING(lpresume_command, lpresume_command) -FN_LOCAL_STRING(queuepause_command, queuepause_command) -FN_LOCAL_STRING(queueresume_command, queueresume_command) -FN_LOCAL_STRING(_printername, _printername) -FN_LOCAL_CONST_STRING(printjob_username, printjob_username) -FN_LOCAL_STRING(magic_script, magic_script) -FN_LOCAL_STRING(magic_output, magic_output) -FN_LOCAL_STRING(comment, comment) -FN_LOCAL_STRING(force_user, force_user) -FN_LOCAL_STRING(force_group, force_group) -FN_LOCAL_LIST(read_list, read_list) -FN_LOCAL_LIST(write_list, write_list) -FN_LOCAL_LIST(vfs_objects, vfs_objects) -FN_LOCAL_STRING(msdfs_proxy, msdfs_proxy) -FN_LOCAL_STRING(volume, volume) -FN_LOCAL_STRING(veto_files, veto_files) -FN_LOCAL_STRING(hide_files, hide_files) -FN_LOCAL_STRING(veto_oplock_files, veto_oplock_files) -FN_LOCAL_STRING(aio_write_behind, aio_write_behind) -FN_LOCAL_STRING(dfree_command, dfree_command) -FN_LOCAL_BOOL(autoloaded, autoloaded) -FN_LOCAL_BOOL(preexec_close, preexec_close) -FN_LOCAL_BOOL(root_preexec_close, root_preexec_close) -FN_LOCAL_INTEGER(case_sensitive, case_sensitive) -FN_LOCAL_BOOL(preserve_case, preserve_case) -FN_LOCAL_BOOL(short_preserve_case, short_preserve_case) -FN_LOCAL_BOOL(hide_dot_files, hide_dot_files) -FN_LOCAL_BOOL(hide_special_files, hide_special_files) -FN_LOCAL_BOOL(hide_unreadable, hide_unreadable) -FN_LOCAL_BOOL(hide_unwriteable_files, hide_unwriteable_files) -FN_LOCAL_BOOL(access_based_share_enum, access_based_share_enum) -FN_LOCAL_BOOL(guest_ok, guest_ok) -FN_LOCAL_BOOL(guest_only, guest_only) -FN_LOCAL_BOOL(administrative_share, administrative_share) -FN_LOCAL_BOOL(print_notify_backchannel, print_notify_backchannel) -FN_LOCAL_BOOL(store_dos_attributes, store_dos_attributes) -FN_LOCAL_BOOL(dmapi_support, dmapi_support) -FN_LOCAL_PARM_BOOL(locking, locking) -- Samba Shared Repository