s3: VFS: Change SMB_VFS_SYS_ACL_GET_FILE to use const struct smb_filename * instead...
[samba.git] / source3 / smbd / pysmbd.c
index fca8f10..df6ab18 100644 (file)
@@ -622,6 +622,8 @@ static PyObject *py_smbd_get_sys_acl(PyObject *self, PyObject *args, PyObject *k
        TALLOC_CTX *tmp_ctx = talloc_new(NULL);
        connection_struct *conn;
        char *service = NULL;
+       struct smb_filename *smb_fname = NULL;
+
        if (!tmp_ctx) {
                PyErr_NoMemory();
                return NULL;
@@ -642,7 +644,15 @@ static PyObject *py_smbd_get_sys_acl(PyObject *self, PyObject *args, PyObject *k
                return NULL;
        }
 
-       acl = SMB_VFS_SYS_ACL_GET_FILE( conn, fname, acl_type, tmp_ctx);
+       smb_fname = synthetic_smb_fname_split(frame,
+                                       fname,
+                                       lp_posix_pathnames());
+       if (smb_fname == NULL) {
+               TALLOC_FREE(frame);
+               TALLOC_FREE(tmp_ctx);
+               return NULL;
+       }
+       acl = SMB_VFS_SYS_ACL_GET_FILE( conn, smb_fname, acl_type, tmp_ctx);
        if (!acl) {
                TALLOC_FREE(frame);
                TALLOC_FREE(tmp_ctx);