summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-02-28 04:27:20 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-04-12 09:22:13 -0400
commit506d34d2e84268c6589f613de0cb3992b8fb87a6 (patch)
treee13bc01ad05c4b99b595dd75c9ca1507c22c7f0f /src/tests
parent5c69fd7c03e762a6fb08a7224eb1d6fd2967d09c (diff)
downloadsssd-506d34d2e84268c6589f613de0cb3992b8fb87a6.tar.gz
sssd-506d34d2e84268c6589f613de0cb3992b8fb87a6.tar.bz2
sssd-506d34d2e84268c6589f613de0cb3992b8fb87a6.zip
sysdb: convert sysdb_set_entry/user/group_attr
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/sysdb-tests.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index 1a850c35..519d1c4b 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -686,11 +686,9 @@ static void test_enumpwent(void *pvt, int error, struct ldb_result *res)
data->error = EOK;
}
-static void test_set_user_attr_done(struct tevent_req *subreq);
static void test_set_user_attr(struct tevent_req *req)
{
struct test_data *data = tevent_req_callback_data(req, struct test_data);
- struct tevent_req *subreq;
int ret;
ret = sysdb_transaction_recv(req, data, &data->handle);
@@ -698,22 +696,9 @@ static void test_set_user_attr(struct tevent_req *req)
return test_return(data, ret);
}
- subreq = sysdb_set_user_attr_send(data, data->ev, data->handle,
- data->ctx->domain, data->username,
- data->attrs, SYSDB_MOD_REP);
- if (!subreq) return test_return(data, ENOMEM);
-
- tevent_req_set_callback(subreq, test_set_user_attr_done, data);
-}
-
-static void test_set_user_attr_done(struct tevent_req *subreq)
-{
- struct test_data *data = tevent_req_callback_data(subreq,
- struct test_data);
- int ret;
-
- ret = sysdb_set_user_attr_recv(subreq);
- talloc_zfree(subreq);
+ ret = sysdb_set_user_attr(data, data->handle->ctx,
+ data->ctx->domain, data->username,
+ data->attrs, SYSDB_MOD_REP);
return test_return(data, ret);
}