2 * Unix SMB/CIFS implementation.
3 * libsmbconf - Samba configuration library, registry backend
4 * Copyright (C) Michael Adam 2008
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #include "lib/smbconf/smbconf_private.h"
23 #define INCLUDES_VALNAME "includes"
25 struct reg_private_data {
26 struct registry_key *base_key;
27 bool open; /* did _we_ open the registry? */
30 /**********************************************************************
34 **********************************************************************/
37 * a convenience helper to cast the private data structure
39 static struct reg_private_data *rpd(struct smbconf_ctx *ctx)
41 return (struct reg_private_data *)(ctx->data);
45 * check whether a given value name is forbidden in registry (smbconf)
47 static bool smbconf_reg_valname_forbidden(const char *valname)
49 /* hard code the list of forbidden names here for now */
50 const char *forbidden_valnames[] = {
55 "includes", /* this has a special meaning internally */
58 const char **forbidden = NULL;
60 for (forbidden = forbidden_valnames; *forbidden != NULL; forbidden++) {
61 if (strwicmp(valname, *forbidden) == 0) {
68 static bool smbconf_reg_valname_valid(const char *valname)
70 return (!smbconf_reg_valname_forbidden(valname) &&
71 lp_parameter_is_valid(valname));
75 * Open a subkey of the base key (i.e a service)
77 static WERROR smbconf_reg_open_service_key(TALLOC_CTX *mem_ctx,
78 struct smbconf_ctx *ctx,
79 const char *servicename,
80 uint32 desired_access,
81 struct registry_key **key)
83 if (servicename == NULL) {
84 *key = rpd(ctx)->base_key;
87 return reg_openkey(mem_ctx, rpd(ctx)->base_key, servicename,
92 * check if a value exists in a given registry key
94 static bool smbconf_value_exists(struct registry_key *key, const char *param)
97 WERROR werr = WERR_OK;
98 TALLOC_CTX *ctx = talloc_stackframe();
99 struct registry_value *value = NULL;
101 werr = reg_queryvalue(ctx, key, param, &value);
102 if (W_ERROR_IS_OK(werr)) {
111 * create a subkey of the base key (i.e. a service...)
113 static WERROR smbconf_reg_create_service_key(TALLOC_CTX *mem_ctx,
114 struct smbconf_ctx *ctx,
115 const char * subkeyname,
116 struct registry_key **newkey)
118 WERROR werr = WERR_OK;
119 TALLOC_CTX *create_ctx;
120 enum winreg_CreateAction action = REG_ACTION_NONE;
122 /* create a new talloc ctx for creation. it will hold
123 * the intermediate parent key (SMBCONF) for creation
124 * and will be destroyed when leaving this function... */
125 create_ctx = talloc_stackframe();
127 werr = reg_createkey(mem_ctx, rpd(ctx)->base_key, subkeyname,
128 REG_KEY_WRITE, newkey, &action);
129 if (W_ERROR_IS_OK(werr) && (action != REG_CREATED_NEW_KEY)) {
130 DEBUG(10, ("Key '%s' already exists.\n", subkeyname));
131 werr = WERR_FILE_EXISTS;
133 if (!W_ERROR_IS_OK(werr)) {
134 DEBUG(5, ("Error creating key %s: %s\n",
135 subkeyname, win_errstr(werr)));
138 talloc_free(create_ctx);
143 * add a value to a key.
145 static WERROR smbconf_reg_set_value(struct registry_key *key,
149 struct registry_value val;
150 WERROR werr = WERR_OK;
152 const char *canon_valname;
153 const char *canon_valstr;
155 if (!lp_canonicalize_parameter_with_value(valname, valstr,
159 if (canon_valname == NULL) {
160 DEBUG(5, ("invalid parameter '%s' given\n",
163 DEBUG(5, ("invalid value '%s' given for "
164 "parameter '%s'\n", valstr, valname));
166 werr = WERR_INVALID_PARAM;
170 if (smbconf_reg_valname_forbidden(canon_valname)) {
171 DEBUG(5, ("Parameter '%s' not allowed in registry.\n",
173 werr = WERR_INVALID_PARAM;
177 subkeyname = strrchr_m(key->key->name, '\\');
178 if ((subkeyname == NULL) || (*(subkeyname +1) == '\0')) {
179 DEBUG(5, ("Invalid registry key '%s' given as "
180 "smbconf section.\n", key->key->name));
181 werr = WERR_INVALID_PARAM;
185 if (!strequal(subkeyname, GLOBAL_NAME) &&
186 lp_parameter_is_global(valname))
188 DEBUG(5, ("Global paramter '%s' not allowed in "
189 "service definition ('%s').\n", canon_valname,
191 werr = WERR_INVALID_PARAM;
198 val.v.sz.str = CONST_DISCARD(char *, canon_valstr);
199 val.v.sz.len = strlen(canon_valstr) + 1;
201 werr = reg_setvalue(key, canon_valname, &val);
202 if (!W_ERROR_IS_OK(werr)) {
203 DEBUG(5, ("Error adding value '%s' to "
205 canon_valname, key->key->name, win_errstr(werr)));
212 static WERROR smbconf_reg_set_multi_sz_value(struct registry_key *key,
214 const uint32_t num_strings,
215 const char **strings)
218 struct registry_value *value;
220 TALLOC_CTX *tmp_ctx = talloc_stackframe();
222 if (strings == NULL) {
223 werr = WERR_INVALID_PARAM;
227 value = TALLOC_ZERO_P(tmp_ctx, struct registry_value);
229 value->type = REG_MULTI_SZ;
230 value->v.multi_sz.num_strings = num_strings;
231 value->v.multi_sz.strings = TALLOC_ARRAY(tmp_ctx, char *, num_strings);
232 if (value->v.multi_sz.strings == NULL) {
236 for (count = 0; count < num_strings; count++) {
237 value->v.multi_sz.strings[count] =
238 talloc_strdup(value->v.multi_sz.strings,
240 if (value->v.multi_sz.strings[count] == NULL) {
246 werr = reg_setvalue(key, valname, value);
247 if (!W_ERROR_IS_OK(werr)) {
248 DEBUG(5, ("Error adding value '%s' to key '%s': %s\n",
249 valname, key->key->name, win_errstr(werr)));
253 talloc_free(tmp_ctx);
258 * format a registry_value into a string.
260 * This is intended to be used for smbconf registry values,
261 * which are ar stored as REG_SZ values, so the incomplete
262 * handling should be ok.
264 static char *smbconf_format_registry_value(TALLOC_CTX *mem_ctx,
265 struct registry_value *value)
269 /* alternatively, create a new talloc context? */
270 if (mem_ctx == NULL) {
274 switch (value->type) {
276 result = talloc_asprintf(mem_ctx, "%d", value->v.dword);
280 result = talloc_asprintf(mem_ctx, "%s", value->v.sz.str);
284 for (j = 0; j < value->v.multi_sz.num_strings; j++) {
285 result = talloc_asprintf(mem_ctx, "%s\"%s\" ",
286 result ? result : "" ,
287 value->v.multi_sz.strings[j]);
288 if (result == NULL) {
295 result = talloc_asprintf(mem_ctx, "binary (%d bytes)",
296 (int)value->v.binary.length);
299 result = talloc_asprintf(mem_ctx, "<unprintable>");
305 static WERROR smbconf_reg_get_includes_internal(TALLOC_CTX *mem_ctx,
306 struct registry_key *key,
307 uint32_t *num_includes,
312 struct registry_value *value = NULL;
313 char **tmp_includes = NULL;
314 TALLOC_CTX *tmp_ctx = talloc_stackframe();
316 if (!smbconf_value_exists(key, INCLUDES_VALNAME)) {
324 werr = reg_queryvalue(tmp_ctx, key, INCLUDES_VALNAME, &value);
325 if (!W_ERROR_IS_OK(werr)) {
329 if (value->type != REG_MULTI_SZ) {
330 /* wront type -- ignore */
334 for (count = 0; count < value->v.multi_sz.num_strings; count++)
336 werr = smbconf_add_string_to_array(tmp_ctx,
339 value->v.multi_sz.strings[count]);
340 if (!W_ERROR_IS_OK(werr)) {
346 *includes = talloc_move(mem_ctx, &tmp_includes);
347 if (*includes == NULL) {
351 *num_includes = count;
358 talloc_free(tmp_ctx);
363 * Get the values of a key as a list of value names
364 * and a list of value strings (ordered)
366 static WERROR smbconf_reg_get_values(TALLOC_CTX *mem_ctx,
367 struct registry_key *key,
368 uint32_t *num_values,
370 char ***value_strings)
372 TALLOC_CTX *tmp_ctx = NULL;
373 WERROR werr = WERR_OK;
375 struct registry_value *valvalue = NULL;
376 char *valname = NULL;
377 uint32_t tmp_num_values = 0;
378 char **tmp_valnames = NULL;
379 char **tmp_valstrings = NULL;
380 uint32_t num_includes = 0;
381 char **includes = NULL;
383 if ((num_values == NULL) || (value_names == NULL) ||
384 (value_strings == NULL))
386 werr = WERR_INVALID_PARAM;
390 tmp_ctx = talloc_stackframe();
393 werr = reg_enumvalue(tmp_ctx, key, count, &valname, &valvalue),
399 if (!smbconf_reg_valname_valid(valname)) {
403 werr = smbconf_add_string_to_array(tmp_ctx,
405 tmp_num_values, valname);
406 if (!W_ERROR_IS_OK(werr)) {
410 valstring = smbconf_format_registry_value(tmp_ctx, valvalue);
411 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_valstrings,
412 tmp_num_values, valstring);
413 if (!W_ERROR_IS_OK(werr)) {
418 if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) {
422 /* now add the includes at the end */
423 werr = smbconf_reg_get_includes_internal(tmp_ctx, key, &num_includes,
425 if (!W_ERROR_IS_OK(werr)) {
428 for (count = 0; count < num_includes; count++) {
429 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_valnames,
430 tmp_num_values, "include");
431 if (!W_ERROR_IS_OK(werr)) {
435 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_valstrings,
438 if (!W_ERROR_IS_OK(werr)) {
445 *num_values = tmp_num_values;
446 if (tmp_num_values > 0) {
447 *value_names = talloc_move(mem_ctx, &tmp_valnames);
448 *value_strings = talloc_move(mem_ctx, &tmp_valstrings);
451 *value_strings = NULL;
455 talloc_free(tmp_ctx);
459 static bool smbconf_reg_key_has_values(struct registry_key *key)
462 uint32_t num_subkeys;
463 uint32_t max_subkeylen;
464 uint32_t max_subkeysize;
466 uint32_t max_valnamelen;
467 uint32_t max_valbufsize;
468 uint32_t secdescsize;
469 NTTIME last_changed_time;
471 werr = reg_queryinfokey(key, &num_subkeys, &max_subkeylen,
472 &max_subkeysize, &num_values, &max_valnamelen,
473 &max_valbufsize, &secdescsize,
475 if (!W_ERROR_IS_OK(werr)) {
479 return (num_values != 0);
483 * delete all values from a key
485 static WERROR smbconf_reg_delete_values(struct registry_key *key)
489 struct registry_value *valvalue;
491 TALLOC_CTX *mem_ctx = talloc_stackframe();
494 werr = reg_enumvalue(mem_ctx, key, count, &valname, &valvalue),
498 werr = reg_deletevalue(key, valname);
499 if (!W_ERROR_IS_OK(werr)) {
503 if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) {
504 DEBUG(1, ("smbconf_reg_delete_values: "
505 "Error enumerating values of %s: %s\n",
514 talloc_free(mem_ctx);
518 /**********************************************************************
520 * smbconf operations: registry implementations
522 **********************************************************************/
525 * initialize the registry smbconf backend
527 static WERROR smbconf_reg_init(struct smbconf_ctx *ctx, const char *path)
529 WERROR werr = WERR_OK;
530 struct nt_user_token *token;
535 ctx->path = talloc_strdup(ctx, path);
536 if (ctx->path == NULL) {
541 ctx->data = TALLOC_ZERO_P(ctx, struct reg_private_data);
543 werr = ntstatus_to_werror(registry_create_admin_token(ctx, &token));
544 if (!W_ERROR_IS_OK(werr)) {
545 DEBUG(1, ("Error creating admin token\n"));
548 rpd(ctx)->open = false;
550 werr = registry_init_smbconf(path);
551 if (!W_ERROR_IS_OK(werr)) {
555 werr = ctx->ops->open_conf(ctx);
556 if (!W_ERROR_IS_OK(werr)) {
557 DEBUG(1, ("Error opening the registry.\n"));
561 werr = reg_open_path(ctx, ctx->path,
562 SEC_RIGHTS_ENUM_SUBKEYS | REG_KEY_WRITE,
563 token, &rpd(ctx)->base_key);
564 if (!W_ERROR_IS_OK(werr)) {
572 static int smbconf_reg_shutdown(struct smbconf_ctx *ctx)
574 return ctx->ops->close_conf(ctx);
577 static bool smbconf_reg_requires_messaging(struct smbconf_ctx *ctx)
579 #ifdef CLUSTER_SUPPORT
580 if (lp_clustering() && lp_parm_bool(-1, "ctdb", "registry.tdb", true)) {
587 static bool smbconf_reg_is_writeable(struct smbconf_ctx *ctx)
590 * The backend has write support.
592 * TODO: add access checks whether the concrete
593 * config source is really writeable by the calling user.
598 static WERROR smbconf_reg_open(struct smbconf_ctx *ctx)
602 if (rpd(ctx)->open) {
607 if (W_ERROR_IS_OK(werr)) {
608 rpd(ctx)->open = true;
613 static int smbconf_reg_close(struct smbconf_ctx *ctx)
617 if (!rpd(ctx)->open) {
623 rpd(ctx)->open = false;
629 * Get the change sequence number of the given service/parameter.
630 * service and parameter strings may be NULL.
632 static void smbconf_reg_get_csn(struct smbconf_ctx *ctx,
633 struct smbconf_csn *csn,
634 const char *service, const char *param)
640 if (!W_ERROR_IS_OK(ctx->ops->open_conf(ctx))) {
644 csn->csn = (uint64_t)regdb_get_seqnum();
648 * Drop the whole configuration (restarting empty) - registry version
650 static WERROR smbconf_reg_drop(struct smbconf_ctx *ctx)
653 WERROR werr = WERR_OK;
654 struct registry_key *parent_key = NULL;
655 struct registry_key *new_key = NULL;
656 TALLOC_CTX* mem_ctx = talloc_stackframe();
657 enum winreg_CreateAction action;
658 struct nt_user_token *token;
660 werr = ntstatus_to_werror(registry_create_admin_token(ctx, &token));
661 if (!W_ERROR_IS_OK(werr)) {
662 DEBUG(1, ("Error creating admin token\n"));
666 path = talloc_strdup(mem_ctx, ctx->path);
671 p = strrchr(path, '\\');
673 werr = reg_open_path(mem_ctx, path, REG_KEY_WRITE, token,
676 if (!W_ERROR_IS_OK(werr)) {
680 werr = reg_deletekey_recursive(mem_ctx, parent_key, p+1);
682 if (!W_ERROR_IS_OK(werr)) {
686 werr = reg_createkey(mem_ctx, parent_key, p+1, REG_KEY_WRITE,
690 talloc_free(mem_ctx);
695 * get the list of share names defined in the configuration.
698 static WERROR smbconf_reg_get_share_names(struct smbconf_ctx *ctx,
700 uint32_t *num_shares,
704 uint32_t added_count = 0;
705 TALLOC_CTX *tmp_ctx = NULL;
706 WERROR werr = WERR_OK;
707 char *subkey_name = NULL;
708 char **tmp_share_names = NULL;
710 if ((num_shares == NULL) || (share_names == NULL)) {
711 werr = WERR_INVALID_PARAM;
715 tmp_ctx = talloc_stackframe();
717 /* if there are values in the base key, return NULL as share name */
719 if (smbconf_reg_key_has_values(rpd(ctx)->base_key)) {
720 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_share_names,
722 if (!W_ERROR_IS_OK(werr)) {
728 /* make sure "global" is always listed first */
729 if (smbconf_share_exists(ctx, GLOBAL_NAME)) {
730 werr = smbconf_add_string_to_array(tmp_ctx, &tmp_share_names,
731 added_count, GLOBAL_NAME);
732 if (!W_ERROR_IS_OK(werr)) {
739 werr = reg_enumkey(tmp_ctx, rpd(ctx)->base_key, count,
744 if (strequal(subkey_name, GLOBAL_NAME)) {
748 werr = smbconf_add_string_to_array(tmp_ctx,
752 if (!W_ERROR_IS_OK(werr)) {
757 if (!W_ERROR_EQUAL(WERR_NO_MORE_ITEMS, werr)) {
762 *num_shares = added_count;
763 if (added_count > 0) {
764 *share_names = talloc_move(mem_ctx, &tmp_share_names);
770 talloc_free(tmp_ctx);
775 * check if a share/service of a given name exists - registry version
777 static bool smbconf_reg_share_exists(struct smbconf_ctx *ctx,
778 const char *servicename)
781 WERROR werr = WERR_OK;
782 TALLOC_CTX *mem_ctx = talloc_stackframe();
783 struct registry_key *key = NULL;
785 werr = smbconf_reg_open_service_key(mem_ctx, ctx, servicename,
787 if (W_ERROR_IS_OK(werr)) {
791 talloc_free(mem_ctx);
796 * Add a service if it does not already exist - registry version
798 static WERROR smbconf_reg_create_share(struct smbconf_ctx *ctx,
799 const char *servicename)
802 struct registry_key *key = NULL;
804 if (servicename == NULL) {
808 werr = smbconf_reg_create_service_key(talloc_tos(), ctx,
816 * get a definition of a share (service) from configuration.
818 static WERROR smbconf_reg_get_share(struct smbconf_ctx *ctx,
820 const char *servicename,
821 struct smbconf_service **service)
823 WERROR werr = WERR_OK;
824 struct registry_key *key = NULL;
825 struct smbconf_service *tmp_service = NULL;
826 TALLOC_CTX *tmp_ctx = talloc_stackframe();
828 werr = smbconf_reg_open_service_key(tmp_ctx, ctx, servicename,
830 if (!W_ERROR_IS_OK(werr)) {
831 if (W_ERROR_EQUAL(werr, WERR_BADFILE)) {
832 werr = WERR_NO_SUCH_SERVICE;
837 tmp_service = TALLOC_ZERO_P(tmp_ctx, struct smbconf_service);
838 if (tmp_service == NULL) {
843 if (servicename != NULL) {
844 tmp_service->name = talloc_strdup(tmp_service, servicename);
845 if (tmp_service->name == NULL) {
851 werr = smbconf_reg_get_values(tmp_service, key,
852 &(tmp_service->num_params),
853 &(tmp_service->param_names),
854 &(tmp_service->param_values));
856 if (W_ERROR_IS_OK(werr)) {
857 *service = talloc_move(mem_ctx, &tmp_service);
861 talloc_free(tmp_ctx);
866 * delete a service from configuration
868 static WERROR smbconf_reg_delete_share(struct smbconf_ctx *ctx,
869 const char *servicename)
871 WERROR werr = WERR_OK;
872 TALLOC_CTX *mem_ctx = talloc_stackframe();
874 if (servicename != NULL) {
875 werr = reg_deletekey_recursive(mem_ctx, rpd(ctx)->base_key,
878 werr = smbconf_reg_delete_values(rpd(ctx)->base_key);
881 talloc_free(mem_ctx);
886 * set a configuration parameter to the value provided.
888 static WERROR smbconf_reg_set_parameter(struct smbconf_ctx *ctx,
894 struct registry_key *key = NULL;
895 TALLOC_CTX *mem_ctx = talloc_stackframe();
897 werr = smbconf_reg_open_service_key(mem_ctx, ctx, service,
898 REG_KEY_WRITE, &key);
899 if (!W_ERROR_IS_OK(werr)) {
903 werr = smbconf_reg_set_value(key, param, valstr);
906 talloc_free(mem_ctx);
911 * get the value of a configuration parameter as a string
913 static WERROR smbconf_reg_get_parameter(struct smbconf_ctx *ctx,
919 WERROR werr = WERR_OK;
920 struct registry_key *key = NULL;
921 struct registry_value *value = NULL;
923 werr = smbconf_reg_open_service_key(mem_ctx, ctx, service,
925 if (!W_ERROR_IS_OK(werr)) {
929 if (!smbconf_reg_valname_valid(param)) {
930 werr = WERR_INVALID_PARAM;
934 if (!smbconf_value_exists(key, param)) {
935 werr = WERR_INVALID_PARAM;
939 werr = reg_queryvalue(mem_ctx, key, param, &value);
940 if (!W_ERROR_IS_OK(werr)) {
944 *valstr = smbconf_format_registry_value(mem_ctx, value);
946 if (*valstr == NULL) {
957 * delete a parameter from configuration
959 static WERROR smbconf_reg_delete_parameter(struct smbconf_ctx *ctx,
963 struct registry_key *key = NULL;
964 WERROR werr = WERR_OK;
965 TALLOC_CTX *mem_ctx = talloc_stackframe();
967 werr = smbconf_reg_open_service_key(mem_ctx, ctx, service,
969 if (!W_ERROR_IS_OK(werr)) {
973 if (!smbconf_reg_valname_valid(param)) {
974 werr = WERR_INVALID_PARAM;
978 if (!smbconf_value_exists(key, param)) {
979 werr = WERR_INVALID_PARAM;
983 werr = reg_deletevalue(key, param);
986 talloc_free(mem_ctx);
990 static WERROR smbconf_reg_get_includes(struct smbconf_ctx *ctx,
993 uint32_t *num_includes,
997 struct registry_key *key = NULL;
998 TALLOC_CTX *tmp_ctx = talloc_stackframe();
1000 werr = smbconf_reg_open_service_key(tmp_ctx, ctx, service,
1001 REG_KEY_READ, &key);
1002 if (!W_ERROR_IS_OK(werr)) {
1006 werr = smbconf_reg_get_includes_internal(mem_ctx, key, num_includes,
1010 talloc_free(tmp_ctx);
1014 static WERROR smbconf_reg_set_includes(struct smbconf_ctx *ctx,
1015 const char *service,
1016 uint32_t num_includes,
1017 const char **includes)
1019 WERROR werr = WERR_OK;
1020 struct registry_key *key = NULL;
1021 TALLOC_CTX *tmp_ctx = talloc_stackframe();
1023 werr = smbconf_reg_open_service_key(tmp_ctx, ctx, service,
1025 if (!W_ERROR_IS_OK(werr)) {
1029 if (num_includes == 0) {
1030 if (!smbconf_value_exists(key, INCLUDES_VALNAME)) {
1033 werr = reg_deletevalue(key, INCLUDES_VALNAME);
1035 werr = smbconf_reg_set_multi_sz_value(key, INCLUDES_VALNAME,
1036 num_includes, includes);
1040 talloc_free(tmp_ctx);
1044 static WERROR smbconf_reg_delete_includes(struct smbconf_ctx *ctx,
1045 const char *service)
1047 WERROR werr = WERR_OK;
1048 struct registry_key *key = NULL;
1049 TALLOC_CTX *tmp_ctx = talloc_stackframe();
1051 werr = smbconf_reg_open_service_key(tmp_ctx, ctx, service,
1053 if (!W_ERROR_IS_OK(werr)) {
1057 if (!smbconf_value_exists(key, INCLUDES_VALNAME)) {
1061 werr = reg_deletevalue(key, INCLUDES_VALNAME);
1065 talloc_free(tmp_ctx);
1069 struct smbconf_ops smbconf_ops_reg = {
1070 .init = smbconf_reg_init,
1071 .shutdown = smbconf_reg_shutdown,
1072 .requires_messaging = smbconf_reg_requires_messaging,
1073 .is_writeable = smbconf_reg_is_writeable,
1074 .open_conf = smbconf_reg_open,
1075 .close_conf = smbconf_reg_close,
1076 .get_csn = smbconf_reg_get_csn,
1077 .drop = smbconf_reg_drop,
1078 .get_share_names = smbconf_reg_get_share_names,
1079 .share_exists = smbconf_reg_share_exists,
1080 .create_share = smbconf_reg_create_share,
1081 .get_share = smbconf_reg_get_share,
1082 .delete_share = smbconf_reg_delete_share,
1083 .set_parameter = smbconf_reg_set_parameter,
1084 .get_parameter = smbconf_reg_get_parameter,
1085 .delete_parameter = smbconf_reg_delete_parameter,
1086 .get_includes = smbconf_reg_get_includes,
1087 .set_includes = smbconf_reg_set_includes,
1088 .delete_includes = smbconf_reg_delete_includes,
1093 * initialize the smbconf registry backend
1094 * the only function that is exported from this module
1096 WERROR smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,
1099 return smbconf_init_internal(mem_ctx, conf_ctx, path, &smbconf_ops_reg);