diff options
Diffstat (limited to 'source3/libnet/libnet_conf.c')
-rw-r--r-- | source3/libnet/libnet_conf.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c index d0ef6eb0e6..47b4800d80 100644 --- a/source3/libnet/libnet_conf.c +++ b/source3/libnet/libnet_conf.c @@ -110,7 +110,7 @@ static WERROR libnet_conf_reg_open_path(TALLOC_CTX *mem_ctx, } werr = ntstatus_to_werror(registry_create_admin_token(tmp_ctx, &token)); - if (W_ERROR_IS_OK(werr)) { + if (!W_ERROR_IS_OK(werr)) { DEBUG(1, ("Error creating admin token\n")); goto done; } @@ -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, |