summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-08 14:24:42 +0200
committerMichael Adam <obnox@samba.org>2008-04-10 01:28:58 +0200
commitd399778accf0bef382b657a834f9d2a80d05fe77 (patch)
treef148ded1862d225cae8de4d5848884585a0671e5 /source3
parentf4de1c6ac7a702a325dd2bb31625efd3867f84c6 (diff)
downloadsamba-d399778accf0bef382b657a834f9d2a80d05fe77.tar.gz
samba-d399778accf0bef382b657a834f9d2a80d05fe77.tar.bz2
samba-d399778accf0bef382b657a834f9d2a80d05fe77.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/smbconf/smbconf.c30
-rw-r--r--source3/lib/smbconf/smbconf.h6
2 files changed, 36 insertions, 0 deletions
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_ */