From ff35160dc6415e1ef5d57717d7636f38ea25a8f0 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Wed, 20 Nov 2019 11:39:20 -0700 Subject: [PATCH] net: Delete share ACL from 'net conf delshare' Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Nov 26 22:55:38 UTC 2019 on sn-devel-184 --- selftest/knownfail.d/sharesec | 1 - source3/utils/net_conf.c | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) delete mode 100644 selftest/knownfail.d/sharesec diff --git a/selftest/knownfail.d/sharesec b/selftest/knownfail.d/sharesec deleted file mode 100644 index 100227cc10d..00000000000 --- a/selftest/knownfail.d/sharesec +++ /dev/null @@ -1 +0,0 @@ -samba3\.blackbox\.sharesec\.Check\ for\ default\ ACL\(simpleserver:local\) diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index 097baa1b82e..267c4c802df 100644 --- a/source3/utils/net_conf.c +++ b/source3/utils/net_conf.c @@ -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); -- 2.47.3