summaryrefslogtreecommitdiffstats
path: root/src/python/pysss.c
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-03-21 02:18:48 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-04-12 09:22:17 -0400
commitd86fc9163127f7c5bd0c3af950fcddff7911867f (patch)
tree87616d3c52142d15be2149ba7f42bd6d20551214 /src/python/pysss.c
parent9fc354f7deb3f0de84f0403ec4f212ca18b5e8e8 (diff)
downloadsssd-d86fc9163127f7c5bd0c3af950fcddff7911867f.tar.gz
sssd-d86fc9163127f7c5bd0c3af950fcddff7911867f.tar.xz
sssd-d86fc9163127f7c5bd0c3af950fcddff7911867f.zip
tools: remove creation of event_context
Since the sysdb is now synchronous and creates its own event context we don't need an explicit event context anymore in the tools.
Diffstat (limited to 'src/python/pysss.c')
-rw-r--r--src/python/pysss.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/python/pysss.c b/src/python/pysss.c
index 7801be5ef..36bae264b 100644
--- a/src/python/pysss.c
+++ b/src/python/pysss.c
@@ -29,17 +29,6 @@
#include "tools/tools_util.h"
#include "tools/sss_sync_ops.h"
-#define TRANSACTION_WAIT(trs, retval) do { \
- while (!trs->transaction_done) { \
- tevent_loop_once(trs->self->ev); \
- } \
- retval = trs->error; \
- if (retval) { \
- PyErr_SetSssError(retval); \
- goto fail; \
- } \
-} while(0)
-
/*
* function taken from samba sources tree as of Aug 20 2009,
* file source4/lib/ldb/pyldb.c
@@ -124,7 +113,6 @@ struct tools_ctx *init_ctx(TALLOC_CTX *mem_ctx,
return NULL;
}
- tctx->ev = self->ev;
tctx->confdb = self->confdb;
tctx->sysdb = self->sysdb;
tctx->local = self->local;
@@ -263,7 +251,6 @@ static PyObject *py_sss_useradd(PySssLocalObject *self,
* sysdb did assign it automatically, do a lookup */
if (tctx->octx->uid == 0 || tctx->octx->gid == 0) {
ret = sysdb_getpwnam_sync(tctx,
- tctx->ev,
tctx->sysdb,
tctx->octx->name,
tctx->local,
@@ -370,7 +357,6 @@ static PyObject *py_sss_userdel(PySssLocalObject *self,
if (tctx->octx->remove_homedir) {
ret = sysdb_getpwnam_sync(tctx,
- tctx->ev,
tctx->sysdb,
tctx->octx->name,
tctx->local,
@@ -771,13 +757,6 @@ static PyObject *PySssLocalObject_new(PyTypeObject *type,
}
self->mem_ctx = mem_ctx;
- self->ev = tevent_context_init(mem_ctx);
- if (self->ev == NULL) {
- talloc_free(mem_ctx);
- PyErr_SetSssErrorWithMessage(EIO, "Cannot create event context");
- return NULL;
- }
-
confdb_path = talloc_asprintf(self->mem_ctx, "%s/%s", DB_PATH, CONFDB_FILE);
if (confdb_path == NULL) {
talloc_free(mem_ctx);