Speed up "net conf list"
[ira/wip.git] / source3 / lib / smbconf / smbconf_reg.c
index e36fa8a2a12ce8d625fce911e5c7caa51322a392..01de193b3c499d32bd65c6b0eef9afea3eb2b6b1 100644 (file)
@@ -896,6 +896,9 @@ static WERROR smbconf_reg_get_share(struct smbconf_ctx *ctx,
        werr = smbconf_reg_open_service_key(tmp_ctx, ctx, servicename,
                                            REG_KEY_READ, &key);
        if (!W_ERROR_IS_OK(werr)) {
+               if (W_ERROR_EQUAL(werr, WERR_BADFILE)) {
+                       werr = WERR_NO_SUCH_SERVICE;
+               }
                goto done;
        }