summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/smbconf/smbconf.c22
-rw-r--r--source3/lib/smbconf/smbconf.h6
-rw-r--r--source3/lib/smbconf/smbconf_private.h6
-rw-r--r--source3/lib/smbconf/smbconf_reg.c21
-rw-r--r--source3/lib/smbconf/smbconf_txt_simple.c20
5 files changed, 73 insertions, 2 deletions
diff --git a/source3/lib/smbconf/smbconf.c b/source3/lib/smbconf/smbconf.c
index 453e228c2c..1ce761ebd4 100644
--- a/source3/lib/smbconf/smbconf.c
+++ b/source3/lib/smbconf/smbconf.c
@@ -335,3 +335,25 @@ WERROR smbconf_delete_global_parameter(struct smbconf_ctx *ctx,
return werr;
}
+
+WERROR smbconf_get_includes(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t *num_includes, char ***includes)
+{
+ if (!smbconf_share_exists(ctx, service)) {
+ return WERR_NO_SUCH_SERVICE;
+ }
+
+ return ctx->ops->get_includes(ctx, service, num_includes, includes);
+}
+
+WERROR smbconf_set_includes(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t num_includes, const char **includes)
+{
+ if (!smbconf_share_exists(ctx, service)) {
+ return WERR_NO_SUCH_SERVICE;
+ }
+
+ return ctx->ops->set_includes(ctx, service, num_includes, includes);
+}
diff --git a/source3/lib/smbconf/smbconf.h b/source3/lib/smbconf/smbconf.h
index d333f6c88c..626d48e962 100644
--- a/source3/lib/smbconf/smbconf.h
+++ b/source3/lib/smbconf/smbconf.h
@@ -86,5 +86,11 @@ WERROR smbconf_delete_parameter(struct smbconf_ctx *ctx,
const char *service, const char *param);
WERROR smbconf_delete_global_parameter(struct smbconf_ctx *ctx,
const char *param);
+WERROR smbconf_get_includes(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t *num_includes, char ***includes);
+WERROR smbconf_set_includes(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t num_includes, const char **includes);
#endif /* _LIBSMBCONF_H_ */
diff --git a/source3/lib/smbconf/smbconf_private.h b/source3/lib/smbconf/smbconf_private.h
index 44229e26ec..1f26fca1ea 100644
--- a/source3/lib/smbconf/smbconf_private.h
+++ b/source3/lib/smbconf/smbconf_private.h
@@ -51,6 +51,12 @@ struct smbconf_ops {
char **valstr);
WERROR (*delete_parameter)(struct smbconf_ctx *ctx,
const char *service, const char *param);
+ WERROR (*get_includes)(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t *num_includes, char ***includes);
+ WERROR (*set_includes)(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t num_includes, const char **includes);
};
struct smbconf_ctx {
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c
index 6d24aecbff..0f499e3146 100644
--- a/source3/lib/smbconf/smbconf_reg.c
+++ b/source3/lib/smbconf/smbconf_reg.c
@@ -776,6 +776,23 @@ done:
return werr;
}
+static WERROR smbconf_reg_get_includes(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t *num_includes,
+ char ***includes)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+static WERROR smbconf_reg_set_includes(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t num_includes,
+ const char **includes)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+
struct smbconf_ops smbconf_ops_reg = {
.init = smbconf_reg_init,
.shutdown = smbconf_reg_shutdown,
@@ -790,7 +807,9 @@ struct smbconf_ops smbconf_ops_reg = {
.delete_share = smbconf_reg_delete_share,
.set_parameter = smbconf_reg_set_parameter,
.get_parameter = smbconf_reg_get_parameter,
- .delete_parameter = smbconf_reg_delete_parameter
+ .delete_parameter = smbconf_reg_delete_parameter,
+ .get_includes = smbconf_reg_get_includes,
+ .set_includes = smbconf_reg_set_includes,
};
diff --git a/source3/lib/smbconf/smbconf_txt_simple.c b/source3/lib/smbconf/smbconf_txt_simple.c
index e87cd04d16..9273b7947b 100644
--- a/source3/lib/smbconf/smbconf_txt_simple.c
+++ b/source3/lib/smbconf/smbconf_txt_simple.c
@@ -494,6 +494,22 @@ static WERROR smbconf_txt_delete_parameter(struct smbconf_ctx *ctx,
return WERR_NOT_SUPPORTED;
}
+static WERROR smbconf_txt_get_includes(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t *num_includes,
+ char ***includes)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+static WERROR smbconf_txt_set_includes(struct smbconf_ctx *ctx,
+ const char *service,
+ uint32_t num_includes,
+ const char **includes)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
static struct smbconf_ops smbconf_ops_txt = {
.init = smbconf_txt_init,
.shutdown = smbconf_txt_shutdown,
@@ -508,7 +524,9 @@ static struct smbconf_ops smbconf_ops_txt = {
.delete_share = smbconf_txt_delete_share,
.set_parameter = smbconf_txt_set_parameter,
.get_parameter = smbconf_txt_get_parameter,
- .delete_parameter = smbconf_txt_delete_parameter
+ .delete_parameter = smbconf_txt_delete_parameter,
+ .get_includes = smbconf_txt_get_includes,
+ .set_includes = smbconf_txt_set_includes,
};