Lines Matching defs:self
109 static struct tools_ctx *init_ctx(PySssLocalObject *self)
114 tctx = talloc_zero(self->mem_ctx, struct tools_ctx);
119 tctx->confdb = self->confdb;
120 tctx->sysdb = self->sysdb;
121 tctx->local = self->local;
130 octx->domain = self->local;
154 static PyObject *py_sss_useradd(PySssLocalObject *self,
193 tctx = init_ctx(self);
220 self->confdb,
309 static PyObject *py_sss_userdel(PySssLocalObject *self,
332 tctx = init_ctx(self);
375 ret = userdel(tctx, self->sysdb, tctx->octx);
419 static PyObject *py_sss_usermod(PySssLocalObject *self,
456 tctx = init_ctx(self);
540 static PyObject *py_sss_groupadd(PySssLocalObject *self,
559 tctx = init_ctx(self);
611 static PyObject *py_sss_groupdel(PySssLocalObject *self,
623 tctx = init_ctx(self);
632 ret = groupdel(tctx, self->sysdb, tctx->octx);
658 static PyObject *py_sss_groupmod(PySssLocalObject *self,
684 tctx = init_ctx(self);
756 static PyObject *py_sss_getgrouplist(PyObject *self, PyObject *args)
834 static void PySssLocalObject_dealloc(PySssLocalObject *self)
836 talloc_free(self->mem_ctx);
837 Py_TYPE(self)->tp_free((PyObject *)self);
848 PySssLocalObject *self;
858 self = (PySssLocalObject *) type->tp_alloc(type, 0);
859 if (self == NULL) {
864 self->mem_ctx = mem_ctx;
866 confdb_path = talloc_asprintf(self->mem_ctx, "%s/%s", DB_PATH, CONFDB_FILE);
873 ret = confdb_init(self->mem_ctx, &self->confdb, confdb_path);
880 ret = sssd_domain_init(self->mem_ctx, self->confdb, "local",
881 DB_PATH, &self->local);
887 self->sysdb = self->local->sysdb;
889 self->lock = DO_LOCK;
890 self->unlock = DO_UNLOCK;
892 return (PyObject *) self;
895 Py_DECREF(self);
963 static PyObject *py_sss_encrypt(PySssPasswordObject *self,
1009 static PyObject *py_sss_decrypt(PySssPasswordObject *self,
1051 static void PySssPasswordObject_dealloc(PySssPasswordObject *self)
1053 Py_TYPE(self)->tp_free((PyObject*) self);
1063 PySssPasswordObject *self;
1065 self = (PySssPasswordObject *) type->tp_alloc(type, 0);
1066 if (self == NULL) {
1071 self->aes_256 = AES_256;
1073 return (PyObject *) self;