diff options
-rw-r--r-- | source4/lib/tls/tls.c | 10 | ||||
-rw-r--r-- | source4/param/loadparm.c | 31 | ||||
-rw-r--r-- | source4/param/param.h | 10 |
3 files changed, 36 insertions, 15 deletions
diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c index f72aafe542..24e4632a49 100644 --- a/source4/lib/tls/tls.c +++ b/source4/lib/tls/tls.c @@ -357,11 +357,11 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, struct loadparm_context * struct tls_params *params; int ret; TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx); - const char *keyfile = private_path(tmp_ctx, lp_ctx, lp_tls_keyfile(lp_ctx)); - const char *certfile = private_path(tmp_ctx, lp_ctx, lp_tls_certfile(lp_ctx)); - const char *cafile = private_path(tmp_ctx, lp_ctx, lp_tls_cafile(lp_ctx)); - const char *crlfile = private_path(tmp_ctx, lp_ctx, lp_tls_crlfile(lp_ctx)); - const char *dhpfile = private_path(tmp_ctx, lp_ctx, lp_tls_dhpfile(lp_ctx)); + const char *keyfile = lp_tls_keyfile(tmp_ctx, lp_ctx); + const char *certfile = lp_tls_certfile(tmp_ctx, lp_ctx); + const char *cafile = lp_tls_cafile(tmp_ctx, lp_ctx); + const char *crlfile = lp_tls_crlfile(tmp_ctx, lp_ctx); + const char *dhpfile = lp_tls_dhpfile(tmp_ctx, lp_ctx); void tls_cert_generate(TALLOC_CTX *, const char *, const char *, const char *); params = talloc(mem_ctx, struct tls_params); if (params == NULL) { diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index e626cdf5dd..739994cb8e 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -616,11 +616,6 @@ _PUBLIC_ FN_GLOBAL_INTEGER(lp_kpasswd_port, kpasswd_port) _PUBLIC_ FN_GLOBAL_INTEGER(lp_web_port, web_port) _PUBLIC_ FN_GLOBAL_STRING(lp_swat_directory, swat_directory) _PUBLIC_ FN_GLOBAL_BOOL(lp_tls_enabled, tls_enabled) -_PUBLIC_ FN_GLOBAL_STRING(lp_tls_keyfile, tls_keyfile) -_PUBLIC_ FN_GLOBAL_STRING(lp_tls_certfile, tls_certfile) -_PUBLIC_ FN_GLOBAL_STRING(lp_tls_cafile, tls_cafile) -_PUBLIC_ FN_GLOBAL_STRING(lp_tls_crlfile, tls_crlfile) -_PUBLIC_ FN_GLOBAL_STRING(lp_tls_dhpfile, tls_dhpfile) _PUBLIC_ FN_GLOBAL_STRING(lp_share_backend, szShareBackend) _PUBLIC_ FN_GLOBAL_STRING(lp_sam_url, szSAM_URL) _PUBLIC_ FN_GLOBAL_STRING(lp_idmap_url, szIDMAP_URL) @@ -2637,3 +2632,29 @@ void lp_smbcli_session_options(struct loadparm_context *lp_ctx, options->ntlmv2_auth = lp_client_ntlmv2_auth(lp_ctx); options->plaintext_auth = lp_client_plaintext_auth(lp_ctx); } + +_PUBLIC_ const char *lp_tls_keyfile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) +{ + return private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_keyfile); +} + +_PUBLIC_ const char *lp_tls_certfile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) +{ + return private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_certfile); +} + +_PUBLIC_ const char *lp_tls_cafile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) +{ + return private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_cafile); +} + +_PUBLIC_ const char *lp_tls_crlfile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) +{ + return private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_crlfile); +} + +_PUBLIC_ const char *lp_tls_dhpfile(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) +{ + return private_path(mem_ctx, lp_ctx, lp_ctx->globals->tls_dhpfile); +} + diff --git a/source4/param/param.h b/source4/param/param.h index 4c6e8b79a2..9c20931186 100644 --- a/source4/param/param.h +++ b/source4/param/param.h @@ -78,11 +78,11 @@ int lp_kpasswd_port(struct loadparm_context *); int lp_web_port(struct loadparm_context *); const char *lp_swat_directory(struct loadparm_context *); bool lp_tls_enabled(struct loadparm_context *); -const char *lp_tls_keyfile(struct loadparm_context *); -const char *lp_tls_certfile(struct loadparm_context *); -const char *lp_tls_cafile(struct loadparm_context *); -const char *lp_tls_crlfile(struct loadparm_context *); -const char *lp_tls_dhpfile(struct loadparm_context *); +const char *lp_tls_keyfile(TALLOC_CTX *mem_ctx, struct loadparm_context *); +const char *lp_tls_certfile(TALLOC_CTX *mem_ctx, struct loadparm_context *); +const char *lp_tls_cafile(TALLOC_CTX *mem_ctx, struct loadparm_context *); +const char *lp_tls_crlfile(TALLOC_CTX *mem_ctx, struct loadparm_context *); +const char *lp_tls_dhpfile(TALLOC_CTX *mem_ctx, struct loadparm_context *); const char *lp_share_backend(struct loadparm_context *); const char *lp_sam_url(struct loadparm_context *); const char *lp_idmap_url(struct loadparm_context *); |