From d399778accf0bef382b657a834f9d2a80d05fe77 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 8 Apr 2008 14:24:42 +0200 Subject: libsmbconf: add "_global_" wrappers for get/set_includes. These use the usual global_check like the other global wrappers. Michael (This used to be commit ce1b2f550860cb3a566db09f7c7eac39c195a5b7) --- source3/lib/smbconf/smbconf.c | 30 ++++++++++++++++++++++++++++++ source3/lib/smbconf/smbconf.h | 6 ++++++ 2 files changed, 36 insertions(+) (limited to 'source3') diff --git a/source3/lib/smbconf/smbconf.c b/source3/lib/smbconf/smbconf.c index d5a334b928..7c24c55781 100644 --- a/source3/lib/smbconf/smbconf.c +++ b/source3/lib/smbconf/smbconf.c @@ -349,6 +349,21 @@ WERROR smbconf_get_includes(struct smbconf_ctx *ctx, includes); } +WERROR smbconf_get_global_includes(struct smbconf_ctx *ctx, + TALLOC_CTX *mem_ctx, + uint32_t *num_includes, char ***includes) +{ + WERROR werr; + + werr = smbconf_global_check(ctx); + if (W_ERROR_IS_OK(werr)) { + werr = smbconf_get_includes(ctx, mem_ctx, GLOBAL_NAME, + num_includes, includes); + } + + return werr; +} + WERROR smbconf_set_includes(struct smbconf_ctx *ctx, const char *service, uint32_t num_includes, const char **includes) @@ -359,3 +374,18 @@ WERROR smbconf_set_includes(struct smbconf_ctx *ctx, return ctx->ops->set_includes(ctx, service, num_includes, includes); } + +WERROR smbconf_set_global_includes(struct smbconf_ctx *ctx, + uint32_t num_includes, + const char **includes) +{ + WERROR werr; + + werr = smbconf_global_check(ctx); + if (W_ERROR_IS_OK(werr)) { + werr = smbconf_set_includes(ctx, GLOBAL_NAME, + num_includes, includes); + } + + return werr; +} diff --git a/source3/lib/smbconf/smbconf.h b/source3/lib/smbconf/smbconf.h index cd39758d3e..a18b88f4e5 100644 --- a/source3/lib/smbconf/smbconf.h +++ b/source3/lib/smbconf/smbconf.h @@ -90,8 +90,14 @@ WERROR smbconf_get_includes(struct smbconf_ctx *ctx, TALLOC_CTX *mem_ctx, const char *service, uint32_t *num_includes, char ***includes); +WERROR smbconf_get_global_includes(struct smbconf_ctx *ctx, + TALLOC_CTX *mem_ctx, + uint32_t *num_includes, char ***includes); WERROR smbconf_set_includes(struct smbconf_ctx *ctx, const char *service, uint32_t num_includes, const char **includes); +WERROR smbconf_set_global_includes(struct smbconf_ctx *ctx, + uint32_t num_includes, + const char **includes); #endif /* _LIBSMBCONF_H_ */ -- cgit