1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-17 04:23:50 +03:00

samba-tool: add command to dump dosinfo xattr from a file

Add a new command "getdosinfo" to samba-tool to dump dosinfo xattr from
a file.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep 29 06:00:49 CEST 2015 on sn-devel-104
This commit is contained in:
Ralph Boehme
2015-09-26 01:16:50 +02:00
committed by Volker Lendecke
parent 44aff1a164
commit 875beefced
3 changed files with 32 additions and 1 deletions

View File

@@ -54,6 +54,14 @@ def checkset_backend(lp, backend, eadbfile):
else:
raise XattrBackendError("Invalid xattr backend choice %s"%backend)
def getdosinfo(lp, file):
try:
attribute = samba.xattr_native.wrap_getxattr(file,
xattr.XATTR_DOSATTRIB_NAME_S3)
except Exception:
return
return ndr_unpack(xattr.DOSATTRIB, attribute)
def getntacl(lp, file, backend=None, eadbfile=None, direct_db_access=True, service=None):
if direct_db_access: