Remove auto-generation of missing share from libnet_conf_set_parameter().
authorMichael Adam <obnox@samba.org>
Sun, 13 Jan 2008 21:49:42 +0000 (22:49 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 13 Jan 2008 22:16:41 +0000 (23:16 +0100)
Günther, I wanted to have this as atomic as possible.
I will add this behaviour to libnet_conf_set_global_parameter() next
with the justification that [global] should exist transparently.

Michael

source/libnet/libnet_conf.c

index 8e44e4f52531eb26a132fb6617f1701c8fe2c5f0..11dc1639ad7752bdb5125d90518c94c5e79c560f 100644 (file)
@@ -776,10 +776,8 @@ WERROR libnet_conf_set_parameter(struct libnet_conf_ctx *ctx,
        TALLOC_CTX *mem_ctx = talloc_stackframe();
 
        if (!libnet_conf_share_exists(ctx, service)) {
-               werr = libnet_conf_create_share(ctx, service);
-               if (!W_ERROR_IS_OK(werr)) {
-                       goto done;
-               }
+               werr = WERR_NO_SUCH_SERVICE;
+               goto done;
        }
 
        werr = libnet_conf_reg_open_service_key(mem_ctx, ctx, service,