summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-20 11:54:30 +0100
committerMichael Adam <obnox@samba.org>2008-03-21 02:25:56 +0100
commitd19e308a146e10f1673a7e6fc36e5303b9d02ac7 (patch)
tree0a87abd7f96915a3837bf623b62eb54f25acf3b0 /source3
parent94ef9248001ed0e0690e5463eff66e41f30f6c10 (diff)
downloadsamba-d19e308a146e10f1673a7e6fc36e5303b9d02ac7.tar.gz
samba-d19e308a146e10f1673a7e6fc36e5303b9d02ac7.tar.bz2
samba-d19e308a146e10f1673a7e6fc36e5303b9d02ac7.zip
libsmbconf: add existence check for service to smbconf_delete_share().
Michael (This used to be commit d44c2ef0b7d7bddb4115b596872748132ebd6ddc)
Diffstat (limited to 'source3')
-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);
}