summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-20 11:53:40 +0100
committerMichael Adam <obnox@samba.org>2008-03-21 02:25:56 +0100
commit94ef9248001ed0e0690e5463eff66e41f30f6c10 (patch)
treef9b8f939c1e5895e9a0d2f895f1076552da9916f /source3/lib
parentfbd2c552eaf88604bf91899355c024fc5a4d95b6 (diff)
downloadsamba-94ef9248001ed0e0690e5463eff66e41f30f6c10.tar.gz
samba-94ef9248001ed0e0690e5463eff66e41f30f6c10.tar.bz2
samba-94ef9248001ed0e0690e5463eff66e41f30f6c10.zip
libsmbconf: add existence check for service to smbconf_get_share().
Michael (This used to be commit 26208d3e96a1e257628366709a1d71ac36f0788b)
Diffstat (limited to 'source3/lib')
-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 d1351843f0..7edefa40d4 100644
--- a/source3/lib/smbconf/smbconf.c
+++ b/source3/lib/smbconf/smbconf.c
@@ -964,6 +964,10 @@ WERROR smbconf_get_share(struct smbconf_ctx *ctx,
const char *servicename, uint32_t *num_params,
char ***param_names, char ***param_values)
{
+ if (!smbconf_share_exists(ctx, servicename)) {
+ return WERR_NO_SUCH_SERVICE;
+ }
+
return smbconf_reg_get_share(ctx, mem_ctx, servicename, num_params,
param_names, param_values);
}