mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
samba-tool ntacl: better messages for missing files
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14937 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Sep 7 06:02:20 UTC 2022 on sn-devel-184
This commit is contained in:
parent
dc9f29e5c3
commit
5a4b050ff7
@ -409,10 +409,15 @@ class cmd_ntacl_sysvolreset(Command):
|
||||
if use_ntvfs:
|
||||
logger.warning("Please note that POSIX permissions have NOT been changed, only the stored NT ACL")
|
||||
|
||||
provision.setsysvolacl(samdb, netlogon, sysvol,
|
||||
LA_uid, BA_gid, domain_sid,
|
||||
lp.get("realm").lower(), samdb.domain_dn(),
|
||||
lp, use_ntvfs=use_ntvfs)
|
||||
try:
|
||||
provision.setsysvolacl(samdb, netlogon, sysvol,
|
||||
LA_uid, BA_gid, domain_sid,
|
||||
lp.get("realm").lower(), samdb.domain_dn(),
|
||||
lp, use_ntvfs=use_ntvfs)
|
||||
except OSError as e:
|
||||
if not e.filename:
|
||||
raise
|
||||
raise CommandError(f"Could not access {e.filename}: {e.strerror}", e)
|
||||
|
||||
|
||||
class cmd_ntacl_sysvolcheck(Command):
|
||||
@ -440,10 +445,15 @@ class cmd_ntacl_sysvolcheck(Command):
|
||||
|
||||
domain_sid = security.dom_sid(samdb.domain_sid)
|
||||
|
||||
provision.checksysvolacl(samdb, netlogon, sysvol,
|
||||
domain_sid,
|
||||
lp.get("realm").lower(), samdb.domain_dn(),
|
||||
lp)
|
||||
try:
|
||||
provision.checksysvolacl(samdb, netlogon, sysvol,
|
||||
domain_sid,
|
||||
lp.get("realm").lower(), samdb.domain_dn(),
|
||||
lp)
|
||||
except OSError as e:
|
||||
if not e.filename:
|
||||
raise
|
||||
raise CommandError(f"Could not access {e.filename}: {e.strerror}", e)
|
||||
|
||||
|
||||
class cmd_ntacl(SuperCommand):
|
||||
|
@ -1 +0,0 @@
|
||||
^samba.tests.samba_tool.ntacl.+test_with_missing_files
|
Loading…
x
Reference in New Issue
Block a user