mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
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>
This commit is contained in:
parent
2bf17a9d75
commit
89ff7b0d85
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
},
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user