libsmbconf: don't complain with WERR_ALREADY_EXISTS for NULL share in smbconf_create_...
authorMichael Adam <obnox@samba.org>
Tue, 15 Apr 2008 15:37:39 +0000 (17:37 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 15 Apr 2008 15:40:28 +0000 (17:40 +0200)
These are values stored inside the base key for registry.
This is not getting deleted.

Michael
(This used to be commit aa167de8252bb615bd21fb3fd9468383b8357d32)

source3/lib/smbconf/smbconf.c

index 0359e000d38b3c09cf899f7c0e8d3c9b710758d8..9565540df4f1ad357e32118c22c56ef017c66b20 100644 (file)
@@ -192,7 +192,7 @@ bool smbconf_share_exists(struct smbconf_ctx *ctx,
 WERROR smbconf_create_share(struct smbconf_ctx *ctx,
                            const char *servicename)
 {
-       if (smbconf_share_exists(ctx, servicename)) {
+       if ((servicename != NULL) && smbconf_share_exists(ctx, servicename)) {
                return WERR_ALREADY_EXISTS;
        }