s3: pysmbd: Change py_smbd_unlink() to call SMB_VFS_UNLINKAT().
authorJeremy Allison <jra@samba.org>
Fri, 13 Sep 2019 18:22:06 +0000 (11:22 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 26 Sep 2019 17:20:48 +0000 (17:20 +0000)
Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/pysmbd.c

index f742569067388dce386f6c1fc4230509e48d7761..69cc96b34a40982b9ec018222fa89b2a07e2910a 100644 (file)
@@ -550,7 +550,10 @@ static PyObject *py_smbd_unlink(PyObject *self, PyObject *args, PyObject *kwargs
                return PyErr_NoMemory();
        }
 
-       ret = SMB_VFS_UNLINK(conn, smb_fname);
+       ret = SMB_VFS_UNLINKAT(conn,
+                       conn->cwd_fsp,
+                       smb_fname,
+                       0);
        if (ret != 0) {
                TALLOC_FREE(frame);
                errno = ret;