From 8921b2222a9e2db9e185486b247fb5fca448971d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 12 Jan 2008 01:28:20 +0100 Subject: Auto-add missing shares in libnet_conf_set_parameter(). Michael, please have a look. Guenther (This used to be commit 9f4506e5e2828e0f23bc37586770995c3424b208) --- source3/libnet/libnet_conf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c index 0bdf4805d7..47b4800d80 100644 --- a/source3/libnet/libnet_conf.c +++ b/source3/libnet/libnet_conf.c @@ -719,8 +719,10 @@ WERROR libnet_conf_set_parameter(const char *service, TALLOC_CTX *mem_ctx = talloc_stackframe(); if (!libnet_conf_share_exists(service)) { - werr = WERR_NO_SUCH_SERVICE; - goto done; + werr = libnet_conf_create_share(service); + if (!W_ERROR_IS_OK(werr)) { + goto done; + } } werr = libnet_conf_reg_open_service_key(mem_ctx, service, REG_KEY_WRITE, -- cgit