]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
net: Delete share ACL from 'net conf delshare'
authorChristof Schmitt <cs@samba.org>
Wed, 20 Nov 2019 18:39:20 +0000 (11:39 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 26 Nov 2019 22:55:38 +0000 (22:55 +0000)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 26 22:55:38 UTC 2019 on sn-devel-184

selftest/knownfail.d/sharesec [deleted file]
source3/utils/net_conf.c

diff --git a/selftest/knownfail.d/sharesec b/selftest/knownfail.d/sharesec
deleted file mode 100644 (file)
index 100227c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-samba3\.blackbox\.sharesec\.Check\ for\ default\ ACL\(simpleserver:local\)
index 097baa1b82e9e8737a8813e9d8c1e55c3b03e340..267c4c802df869ed6a976931d3c8c0762fb594ac 100644 (file)
@@ -745,6 +745,7 @@ static int net_conf_delshare(struct net_context *c,
        int ret = -1;
        const char *sharename = NULL;
        sbcErr err;
+       NTSTATUS status;
        TALLOC_CTX *mem_ctx = talloc_stackframe();
 
        if (argc != 1 || c->display_usage) {
@@ -764,6 +765,14 @@ static int net_conf_delshare(struct net_context *c,
                goto done;
        }
 
+       status = delete_share_security(sharename);
+       if (!NT_STATUS_IS_OK(status) &&
+           !NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+               d_fprintf(stderr, _("deleting share acl failed for %s: %s\n"),
+                         sharename, nt_errstr(status));
+               goto done;
+       }
+
        ret = 0;
 done:
        TALLOC_FREE(mem_ctx);