From: Christof Schmitt Date: Wed, 20 Nov 2019 18:39:20 +0000 (-0700) Subject: net: Delete share ACL from 'net conf delshare' X-Git-Tag: ldb-2.1.0~602 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff35160dc6415e1ef5d57717d7636f38ea25a8f0;p=thirdparty%2Fsamba.git 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 --- 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);