diff options
-rw-r--r-- | docs-xml/smbdotconf/security/tlscafile.xml | 3 | ||||
-rw-r--r-- | docs-xml/smbdotconf/security/tlscertfile.xml | 3 | ||||
-rw-r--r-- | docs-xml/smbdotconf/security/tlscrlfile.xml | 3 | ||||
-rw-r--r-- | docs-xml/smbdotconf/security/tlsdhparamsfile.xml | 3 | ||||
-rw-r--r-- | docs-xml/smbdotconf/security/tlskeyfile.xml | 3 | ||||
-rw-r--r-- | lib/param/loadparm.c | 17 | ||||
-rw-r--r-- | lib/param/param_table.c | 10 | ||||
-rw-r--r-- | source3/param/loadparm.c | 13 |
8 files changed, 25 insertions, 30 deletions
diff --git a/docs-xml/smbdotconf/security/tlscafile.xml b/docs-xml/smbdotconf/security/tlscafile.xml index 0a54e994b63..889dd23f3b1 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 0365554c012..df5fb5fbf64 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 659a3d5f5a7..4c9de355678 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 b248a346a09..b965b1ebec4 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 6cf7bd79efc..a1c7be3f388 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/loadparm.c b/lib/param/loadparm.c index f9092c6b8e4..9795614affd 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -87,12 +87,7 @@ static bool defaults_saved = false; 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; + int ismb2_max_credits; #include "lib/param/param_global.h" @@ -2710,27 +2705,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/param_table.c b/lib/param/param_table.c index d108833aba1..ad929ec16b2 100644 --- a/lib/param/param_table.c +++ b/lib/param/param_table.c @@ -4349,7 +4349,7 @@ static struct parm_struct parm_table[] = { .label = "tls keyfile", .type = P_STRING, .p_class = P_GLOBAL, - .offset = GLOBAL_VAR(tls_keyfile), + .offset = GLOBAL_VAR(_tls_keyfile), .special = NULL, .enum_list = NULL }, @@ -4357,7 +4357,7 @@ static struct parm_struct parm_table[] = { .label = "tls certfile", .type = P_STRING, .p_class = P_GLOBAL, - .offset = GLOBAL_VAR(tls_certfile), + .offset = GLOBAL_VAR(_tls_certfile), .special = NULL, .enum_list = NULL }, @@ -4365,7 +4365,7 @@ static struct parm_struct parm_table[] = { .label = "tls cafile", .type = P_STRING, .p_class = P_GLOBAL, - .offset = GLOBAL_VAR(tls_cafile), + .offset = GLOBAL_VAR(_tls_cafile), .special = NULL, .enum_list = NULL }, @@ -4373,7 +4373,7 @@ static struct parm_struct parm_table[] = { .label = "tls crlfile", .type = P_STRING, .p_class = P_GLOBAL, - .offset = GLOBAL_VAR(tls_crlfile), + .offset = GLOBAL_VAR(_tls_crlfile), .special = NULL, .enum_list = NULL }, @@ -4381,7 +4381,7 @@ static struct parm_struct parm_table[] = { .label = "tls dh params file", .type = P_STRING, .p_class = P_GLOBAL, - .offset = GLOBAL_VAR(tls_dhpfile), + .offset = GLOBAL_VAR(_tls_dhpfile), .special = NULL, .enum_list = NULL }, diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index be18f10921f..c780f4e72ca 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -123,12 +123,7 @@ static bool defaults_saved = false; 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; + int ismb2_max_credits; #include "lib/param/param_global.h" @@ -1036,9 +1031,9 @@ static void init_globals(bool reinit_globals) Globals.tls_enabled = true; - string_set(&Globals.tls_keyfile, "tls/key.pem"); - string_set(&Globals.tls_certfile, "tls/cert.pem"); - string_set(&Globals.tls_cafile, "tls/ca.pem"); + string_set(&Globals._tls_keyfile, "tls/key.pem"); + string_set(&Globals._tls_certfile, "tls/cert.pem"); + string_set(&Globals._tls_cafile, "tls/ca.pem"); string_set(&Globals.share_backend, "classic"); |