summaryrefslogtreecommitdiff
path: root/source3/lib/smbconf
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r--source3/lib/smbconf/smbconf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/smbconf/smbconf.c b/source3/lib/smbconf/smbconf.c
index 7edefa40d4..bd3d551d69 100644
--- a/source3/lib/smbconf/smbconf.c
+++ b/source3/lib/smbconf/smbconf.c
@@ -977,6 +977,10 @@ WERROR smbconf_get_share(struct smbconf_ctx *ctx,
*/
WERROR smbconf_delete_share(struct smbconf_ctx *ctx, const char *servicename)
{
+ if (!smbconf_share_exists(ctx, servicename)) {
+ return WERR_NO_SUCH_SERVICE;
+ }
+
return smbconf_reg_delete_share(ctx, servicename);
}