summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-04-12 09:17:41 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-04-12 09:22:11 -0400
commitcae9c9fbdebc3f6a4c390a20e75447217439dff7 (patch)
treec154ccd741e229430e630aa8980f6d4a32e5587d /src/python
parenta21698161dcc506e469d7af58099e952062ff256 (diff)
downloadsssd-cae9c9fbdebc3f6a4c390a20e75447217439dff7.tar.gz
sssd-cae9c9fbdebc3f6a4c390a20e75447217439dff7.tar.bz2
sssd-cae9c9fbdebc3f6a4c390a20e75447217439dff7.zip
sysdb: convert sysdb_delete_entry
Diffstat (limited to 'src/python')
-rw-r--r--src/python/pysss.c47
1 files changed, 6 insertions, 41 deletions
diff --git a/src/python/pysss.c b/src/python/pysss.c
index 7c84c21e..bd6d16e3 100644
--- a/src/python/pysss.c
+++ b/src/python/pysss.c
@@ -385,27 +385,10 @@ static PyObject *py_sss_userdel(PySssLocalObject *self,
}
}
- /* Delete the user within a transaction */
- start_transaction(tctx);
- if (tctx->error != EOK) {
- PyErr_SetSssError(tctx->error);
- goto fail;
- }
-
- ret = userdel(tctx, self->ev,
- self->sysdb, tctx->handle, tctx->octx);
+ /* Delete the user */
+ ret = userdel(tctx, self->sysdb, tctx->octx);
if (ret != EOK) {
- tctx->error = ret;
-
- /* cancel transaction */
- talloc_zfree(tctx->handle);
- PyErr_SetSssError(tctx->error);
- goto fail;
- }
-
- end_transaction(tctx);
- if (tctx->error) {
- PyErr_SetSssError(tctx->error);
+ PyErr_SetSssError(ret);
goto fail;
}
@@ -653,28 +636,10 @@ static PyObject *py_sss_groupdel(PySssLocalObject *self,
tctx->octx->name = groupname;
- /* Remove the group within a transaction */
- start_transaction(tctx);
- if (tctx->error != EOK) {
- PyErr_SetSssError(tctx->error);
- goto fail;
- }
-
- /* groupdel */
- ret = groupdel(tctx, self->ev,
- self->sysdb, tctx->handle, tctx->octx);
+ /* Remove the group */
+ ret = groupdel(tctx, self->sysdb, tctx->octx);
if (ret != EOK) {
- tctx->error = ret;
-
- /* cancel transaction */
- talloc_zfree(tctx->handle);
- PyErr_SetSssError(tctx->error);
- goto fail;
- }
-
- end_transaction(tctx);
- if (tctx->error) {
- PyErr_SetSssError(tctx->error);
+ PyErr_SetSssError(ret);
goto fail;
}