summaryrefslogtreecommitdiffstats
path: root/server/tools
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools')
-rw-r--r--server/tools/sss_groupadd.c12
-rw-r--r--server/tools/sss_groupdel.c12
-rw-r--r--server/tools/sss_groupmod.c16
-rw-r--r--server/tools/sss_useradd.c14
-rw-r--r--server/tools/sss_userdel.c12
-rw-r--r--server/tools/sss_usermod.c16
6 files changed, 41 insertions, 41 deletions
diff --git a/server/tools/sss_groupadd.c b/server/tools/sss_groupadd.c
index 685de6ffa..acb26f3aa 100644
--- a/server/tools/sss_groupadd.c
+++ b/server/tools/sss_groupadd.c
@@ -44,7 +44,7 @@
#endif
struct group_add_ctx {
- struct sysdb_req *sysreq;
+ struct sysdb_handle *handle;
struct sss_domain_info *domain;
struct tools_ctx *ctx;
@@ -63,22 +63,22 @@ static void add_group_done(void *pvt, int error, struct ldb_result *ignore)
data->done = true;
- sysdb_transaction_done(data->sysreq, error);
+ sysdb_transaction_done(data->handle, error);
if (error)
data->error = error;
}
-/* sysdb_req_fn_t */
-static void add_group(struct sysdb_req *req, void *pvt)
+/* sysdb_fn_t */
+static void add_group(struct sysdb_handle *handle, void *pvt)
{
struct group_add_ctx *group_ctx;
int ret;
group_ctx = talloc_get_type(pvt, struct group_add_ctx);
- group_ctx->sysreq = req;
+ group_ctx->handle = handle;
- ret = sysdb_add_group(req, group_ctx->domain,
+ ret = sysdb_add_group(handle, group_ctx->domain,
group_ctx->groupname,
group_ctx->gid,
add_group_done,
diff --git a/server/tools/sss_groupdel.c b/server/tools/sss_groupdel.c
index fa23ea82c..820cf2520 100644
--- a/server/tools/sss_groupdel.c
+++ b/server/tools/sss_groupdel.c
@@ -41,7 +41,7 @@
struct group_del_ctx {
- struct sysdb_req *sysreq;
+ struct sysdb_handle *handle;
sysdb_callback_t next_fn;
gid_t gid;
@@ -62,22 +62,22 @@ static void groupdel_done(void *pvt, int error, struct ldb_result *ignore)
data->done = true;
- sysdb_transaction_done(data->sysreq, error);
+ sysdb_transaction_done(data->handle, error);
if (error)
data->error = error;
}
-/* sysdb_req_fn_t */
-static void group_del(struct sysdb_req *req, void *pvt)
+/* sysdb_fn_t */
+static void group_del(struct sysdb_handle *handle, void *pvt)
{
struct group_del_ctx *group_ctx;
int ret;
group_ctx = talloc_get_type(pvt, struct group_del_ctx);
- group_ctx->sysreq = req;
+ group_ctx->handle = handle;
- ret = sysdb_delete_entry(req,
+ ret = sysdb_delete_entry(handle,
group_ctx->group_dn,
groupdel_done,
group_ctx);
diff --git a/server/tools/sss_groupmod.c b/server/tools/sss_groupmod.c
index 9bc3ef6f5..0c2abda8f 100644
--- a/server/tools/sss_groupmod.c
+++ b/server/tools/sss_groupmod.c
@@ -45,7 +45,7 @@
#endif
struct group_mod_ctx {
- struct sysdb_req *sysreq;
+ struct sysdb_handle *handle;
struct sss_domain_info *domain;
struct tools_ctx *ctx;
@@ -68,7 +68,7 @@ static void mod_group_done(void *pvt, int error, struct ldb_result *ignore)
data->done = true;
- sysdb_transaction_done(data->sysreq, error);
+ sysdb_transaction_done(data->handle, error);
if (error)
data->error = error;
@@ -76,19 +76,19 @@ static void mod_group_done(void *pvt, int error, struct ldb_result *ignore)
static void add_to_groups(void *, int, struct ldb_result *);
-/* sysdb_req_fn_t */
-static void mod_group(struct sysdb_req *req, void *pvt)
+/* sysdb_fn_t */
+static void mod_group(struct sysdb_handle *handle, void *pvt)
{
struct group_mod_ctx *group_ctx;
int ret;
group_ctx = talloc_get_type(pvt, struct group_mod_ctx);
- group_ctx->sysreq = req;
+ group_ctx->handle = handle;
if(group_ctx->gid == 0) {
add_to_groups(group_ctx, EOK, NULL);
} else {
- ret = sysdb_set_group_gid(req,
+ ret = sysdb_set_group_gid(handle,
group_ctx->domain,
group_ctx->groupname,
group_ctx->gid,
@@ -134,7 +134,7 @@ static void remove_from_groups(void *pvt, int error, struct ldb_result *ignore)
return;
}
- ret = sysdb_remove_group_member(group_ctx->sysreq,
+ ret = sysdb_remove_group_member(group_ctx->handle,
group_dn, parent_group_dn,
remove_from_groups, group_ctx);
if (ret != EOK)
@@ -179,7 +179,7 @@ static void add_to_groups(void *pvt, int error, struct ldb_result *ignore)
return;
}
- ret = sysdb_add_group_member(group_ctx->sysreq,
+ ret = sysdb_add_group_member(group_ctx->handle,
group_dn, parent_group_dn,
add_to_groups, group_ctx);
if (ret != EOK)
diff --git a/server/tools/sss_useradd.c b/server/tools/sss_useradd.c
index 5ee011659..d1d83cf1d 100644
--- a/server/tools/sss_useradd.c
+++ b/server/tools/sss_useradd.c
@@ -84,7 +84,7 @@
#define DFL_BASEDIR_VAL "/home"
struct user_add_ctx {
- struct sysdb_req *sysreq;
+ struct sysdb_handle *handle;
struct sss_domain_info *domain;
struct tools_ctx *ctx;
@@ -196,22 +196,22 @@ static void add_user_done(void *pvt, int error, struct ldb_result *ignore)
data->done = true;
- sysdb_transaction_done(data->sysreq, error);
+ sysdb_transaction_done(data->handle, error);
if (error)
data->error = error;
}
-/* sysdb_req_fn_t */
-static void add_user(struct sysdb_req *req, void *pvt)
+/* sysdb_fn_t */
+static void add_user(struct sysdb_handle *handle, void *pvt)
{
struct user_add_ctx *user_ctx;
int ret;
user_ctx = talloc_get_type(pvt, struct user_add_ctx);
- user_ctx->sysreq = req;
+ user_ctx->handle = handle;
- ret = sysdb_add_user(req, user_ctx->domain,
+ ret = sysdb_add_user(handle, user_ctx->domain,
user_ctx->username,
user_ctx->uid,
user_ctx->gid,
@@ -258,7 +258,7 @@ static void add_to_groups(void *pvt, int error, struct ldb_result *ignore)
return;
}
- ret = sysdb_add_group_member(user_ctx->sysreq,
+ ret = sysdb_add_group_member(user_ctx->handle,
user_dn, group_dn,
add_to_groups, user_ctx);
if (ret != EOK)
diff --git a/server/tools/sss_userdel.c b/server/tools/sss_userdel.c
index 90dfdaf16..0222d00cc 100644
--- a/server/tools/sss_userdel.c
+++ b/server/tools/sss_userdel.c
@@ -40,7 +40,7 @@
#endif
struct user_del_ctx {
- struct sysdb_req *sysreq;
+ struct sysdb_handle *handle;
sysdb_callback_t next_fn;
uid_t uid;
@@ -61,22 +61,22 @@ static void userdel_done(void *pvt, int error, struct ldb_result *ignore)
data->done = true;
- sysdb_transaction_done(data->sysreq, error);
+ sysdb_transaction_done(data->handle, error);
if (error)
data->error = error;
}
-/* sysdb_req_fn_t */
-static void user_del(struct sysdb_req *req, void *pvt)
+/* sysdb_fn_t */
+static void user_del(struct sysdb_handle *handle, void *pvt)
{
struct user_del_ctx *user_ctx;
int ret;
user_ctx = talloc_get_type(pvt, struct user_del_ctx);
- user_ctx->sysreq = req;
+ user_ctx->handle = handle;
- ret = sysdb_delete_entry(req,
+ ret = sysdb_delete_entry(handle,
user_ctx->user_dn,
userdel_done,
user_ctx);
diff --git a/server/tools/sss_usermod.c b/server/tools/sss_usermod.c
index d34a6c72d..7bb8d663a 100644
--- a/server/tools/sss_usermod.c
+++ b/server/tools/sss_usermod.c
@@ -82,7 +82,7 @@
#endif
struct user_mod_ctx {
- struct sysdb_req *sysreq;
+ struct sysdb_handle *handle;
struct sss_domain_info *domain;
struct tools_ctx *ctx;
@@ -105,7 +105,7 @@ static void mod_user_done(void *pvt, int error, struct ldb_result *ignore)
data->done = true;
- sysdb_transaction_done(data->sysreq, error);
+ sysdb_transaction_done(data->handle, error);
if (error)
data->error = error;
@@ -113,19 +113,19 @@ static void mod_user_done(void *pvt, int error, struct ldb_result *ignore)
static void add_to_groups(void *, int, struct ldb_result *);
-/* sysdb_req_fn_t */
-static void mod_user(struct sysdb_req *req, void *pvt)
+/* sysdb_fn_t */
+static void mod_user(struct sysdb_handle *handle, void *pvt)
{
struct user_mod_ctx *user_ctx;
int ret;
user_ctx = talloc_get_type(pvt, struct user_mod_ctx);
- user_ctx->sysreq = req;
+ user_ctx->handle = handle;
if(user_ctx->attrs->num == 0) {
add_to_groups(user_ctx, EOK, NULL);
} else {
- ret = sysdb_set_user_attr(req,
+ ret = sysdb_set_user_attr(handle,
user_ctx->domain,
user_ctx->username,
user_ctx->attrs,
@@ -172,7 +172,7 @@ static void remove_from_groups(void *pvt, int error, struct ldb_result *ignore)
return;
}
- ret = sysdb_remove_group_member(user_ctx->sysreq,
+ ret = sysdb_remove_group_member(user_ctx->handle,
user_dn, group_dn,
remove_from_groups, user_ctx);
if (ret != EOK)
@@ -217,7 +217,7 @@ static void add_to_groups(void *pvt, int error, struct ldb_result *ignore)
return;
}
- ret = sysdb_add_group_member(user_ctx->sysreq,
+ ret = sysdb_add_group_member(user_ctx->handle,
user_dn, group_dn,
add_to_groups, user_ctx);
if (ret != EOK)