From d6c7e9b1ed6f7befbb2239350bba4547ef781e58 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 12 Nov 2012 17:11:34 +1100 Subject: smbd: Remove NT4 compatability handling in posix -> NT ACL conversion NT4 is long dead, and we should not change which ACL we return based on what we think the client is. The reason we should not do this, is that if we are using vfs_acl_xattr then the hash will break if we do. Additionally, it would require that the python VFS interface set the global remote_arch to fake up being a modern client. This instead seems cleaner and removes untested code (the tests are updated to then handle the results of the modern codepath). The supporting 'acl compatability' parameter is also removed. Andrew Bartlett Reviewed by: Jeremy Allison --- source4/libcli/pysmb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/pysmb.c b/source4/libcli/pysmb.c index 1122305c28..fb981c7f18 100644 --- a/source4/libcli/pysmb.c +++ b/source4/libcli/pysmb.c @@ -317,10 +317,11 @@ static PyObject *py_smb_getacl(pytalloc_Object *self, PyObject *args, PyObject * union smb_fileinfo fio; struct smb_private_data *spdata; const char *filename; - int sinfo = 0; + uint32_t sinfo = 0; + int access_mask = SEC_FLAG_MAXIMUM_ALLOWED; int fnum; - if (!PyArg_ParseTuple(args, "s|i:get_acl", &filename, &sinfo)) { + if (!PyArg_ParseTuple(args, "s|Ii:get_acl", &filename, &sinfo, &access_mask)) { return NULL; } @@ -331,7 +332,7 @@ static PyObject *py_smb_getacl(pytalloc_Object *self, PyObject *args, PyObject * io.generic.level = RAW_OPEN_NTCREATEX; io.ntcreatex.in.root_fid.fnum = 0; io.ntcreatex.in.flags = 0; - io.ntcreatex.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; + io.ntcreatex.in.access_mask = access_mask; io.ntcreatex.in.create_options = 0; io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL; io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ | -- cgit