summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-03-01 14:55:59 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-03-08 01:58:29 +0100
commita2013c3a5ab80283a4b95004e4d1606e0003a4a8 (patch)
tree3b5332f744d7016b6b7692c9d40dc4c8420e4ede /source4
parent6d348c443a92dfe9bdad73d36c0303a765468870 (diff)
downloadsamba-a2013c3a5ab80283a4b95004e4d1606e0003a4a8.tar.gz
pysmb: Use pytalloc_get_ptr()
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/pysmb.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source4/libcli/pysmb.c b/source4/libcli/pysmb.c
index dde37e0467f..5b2b99a6f97 100644
--- a/source4/libcli/pysmb.c
+++ b/source4/libcli/pysmb.c
@@ -113,7 +113,7 @@ static PyObject * py_smb_loadfile(pytalloc_Object *self, PyObject *args)
io.in.fname = filename;
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
status = smb_composite_loadfile(spdata->tree, self->talloc_ctx, &io);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
@@ -139,7 +139,7 @@ static PyObject * py_smb_savefile(pytalloc_Object *self, PyObject *args)
io.in.data = (unsigned char *)data;
io.in.size = strlen(data);
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
status = smb_composite_savefile(spdata->tree, &io);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
@@ -204,7 +204,7 @@ static PyObject *py_smb_list(pytalloc_Object *self, PyObject *args, PyObject *kw
}
dos_format(mask);
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
if((py_dirlist = PyList_New(0)) == NULL) {
PyErr_NoMemory();
@@ -231,7 +231,7 @@ static PyObject *py_smb_mkdir(pytalloc_Object *self, PyObject *args)
return NULL;
}
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
status = smbcli_mkdir(spdata->tree, dirname);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
@@ -251,7 +251,7 @@ static PyObject *py_smb_rmdir(pytalloc_Object *self, PyObject *args)
return NULL;
}
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
status = smbcli_rmdir(spdata->tree, dirname);
PyErr_NTSTATUS_IS_ERR_RAISE(status);
@@ -271,7 +271,7 @@ static PyObject *py_smb_deltree(pytalloc_Object *self, PyObject *args)
return NULL;
}
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
status = smbcli_deltree(spdata->tree, dirname);
if (status <= 0) {
return NULL;
@@ -293,7 +293,7 @@ static PyObject *py_smb_chkpath(pytalloc_Object *self, PyObject *args)
return NULL;
}
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
status = smbcli_chkpath(spdata->tree, path);
if (NT_STATUS_IS_OK(status)) {
@@ -323,7 +323,7 @@ static PyObject *py_smb_getacl(pytalloc_Object *self, PyObject *args, PyObject *
ZERO_STRUCT(io);
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
io.generic.level = RAW_OPEN_NTCREATEX;
io.ntcreatex.in.root_fid.fnum = 0;
@@ -388,7 +388,7 @@ static PyObject *py_smb_setacl(pytalloc_Object *self, PyObject *args, PyObject *
return NULL;
}
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
sd = pytalloc_get_type(py_sd, struct security_descriptor);
if (!sd) {
@@ -400,7 +400,7 @@ static PyObject *py_smb_setacl(pytalloc_Object *self, PyObject *args, PyObject *
ZERO_STRUCT(io);
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
io.generic.level = RAW_OPEN_NTCREATEX;
io.ntcreatex.in.root_fid.fnum = 0;
@@ -475,7 +475,7 @@ static PyObject *py_open_file(pytalloc_Object *self, PyObject *args, PyObject *k
ZERO_STRUCT(io);
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
mem_ctx = talloc_new(NULL);
@@ -514,7 +514,7 @@ static PyObject *py_close_file(pytalloc_Object *self, PyObject *args, PyObject *
return NULL;
}
- spdata = self->ptr;
+ spdata = pytalloc_get_ptr(self);
/*
* Should check the status ...