diff options
-rw-r--r-- | lib/smbconf/smbconf.c | 4 | ||||
-rw-r--r-- | source3/lib/smbconf/smbconf_reg.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/smbconf/smbconf.c b/lib/smbconf/smbconf.c index bcab0b97cd..595fd23421 100644 --- a/lib/smbconf/smbconf.c +++ b/lib/smbconf/smbconf.c @@ -203,10 +203,6 @@ WERROR smbconf_get_share(struct smbconf_ctx *ctx, const char *servicename, struct smbconf_service **service) { - if (!smbconf_share_exists(ctx, servicename)) { - return WERR_NO_SUCH_SERVICE; - } - return ctx->ops->get_share(ctx, mem_ctx, servicename, service); } diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c index e36fa8a2a1..01de193b3c 100644 --- a/source3/lib/smbconf/smbconf_reg.c +++ b/source3/lib/smbconf/smbconf_reg.c @@ -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; } |