summaryrefslogtreecommitdiffstats
path: root/src/tests/sysdb-tests.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 20:03:33 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:01 +0100
commit6ac396bebb4cd3124711d26dce54263f6f9c7c45 (patch)
treec497a634c0e14ab3c55469f3669b1a0f9d5f3fc3 /src/tests/sysdb-tests.c
parentb7427d63bd328be32991f9d437c4a3d46bcabe03 (diff)
downloadsssd-6ac396bebb4cd3124711d26dce54263f6f9c7c45.tar.gz
sssd-6ac396bebb4cd3124711d26dce54263f6f9c7c45.tar.xz
sssd-6ac396bebb4cd3124711d26dce54263f6f9c7c45.zip
Add domain argument to sysdb_store_user()
Also remove sysdb_store_domuser()
Diffstat (limited to 'src/tests/sysdb-tests.c')
-rw-r--r--src/tests/sysdb-tests.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index 91298e146..e1944809d 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -206,7 +206,8 @@ static int test_store_user(struct test_data *data)
homedir = talloc_asprintf(data, "/home/testuser%d", data->uid);
gecos = talloc_asprintf(data, "Test User %d", data->uid);
- ret = sysdb_store_user(data->ctx->sysdb, data->username, "x",
+ ret = sysdb_store_user(data->ctx->sysdb, data->ctx->domain,
+ data->username, "x",
data->uid, 0, gecos, homedir,
data->shell ? data->shell : "/bin/bash",
NULL, NULL, NULL, -1, 0);
@@ -3376,7 +3377,8 @@ START_TEST(test_user_rename)
fail_unless(ret == EOK, "Could not set up the test");
/* Store and verify the first user */
- ret = sysdb_store_user(test_ctx->sysdb, fromname, NULL, userid, 0,
+ ret = sysdb_store_user(test_ctx->sysdb, test_ctx->domain,
+ fromname, NULL, userid, 0,
fromname, "/", "/bin/sh",
NULL, NULL, NULL, 0, 0);
fail_unless(ret == EOK, "Could not add first user");
@@ -3403,8 +3405,9 @@ START_TEST(test_user_rename)
fromname, "/", "/bin/sh", NULL, NULL, 0, 0);
fail_unless(ret == EEXIST, "A second user added with low level call?");
- ret = sysdb_store_user(test_ctx->sysdb, toname, NULL, userid, 0,
- fromname, "/", "/bin/sh", NULL, NULL, NULL, 0, 0);
+ ret = sysdb_store_user(test_ctx->sysdb, test_ctx->domain, toname, NULL,
+ userid, 0, fromname, "/", "/bin/sh",
+ NULL, NULL, NULL, 0, 0);
fail_unless(ret == EOK, "Could not add second user");
ret = sysdb_getpwnam(test_ctx, test_ctx->sysdb,
@@ -4359,8 +4362,9 @@ START_TEST(test_sysdb_subdomain_store_user)
NULL, NULL);
fail_unless(subdomain != NULL, "new_subdomain failed.");
- ret = sysdb_store_user(subdomain->sysdb, "subdomuser", NULL, 12345, 0,
- "Sub Domain User", "/home/subdomuser", "/bin/bash",
+ ret = sysdb_store_user(subdomain->sysdb, subdomain, "subdomuser",
+ NULL, 12345, 0, "Sub Domain User",
+ "/home/subdomuser", "/bin/bash",
NULL, NULL, NULL, -1, 0);
fail_unless(ret == EOK, "sysdb_store_user failed.");
@@ -4414,9 +4418,10 @@ START_TEST(test_sysdb_subdomain_user_ops)
NULL, NULL);
fail_unless(subdomain != NULL, "new_subdomain failed.");
- ret = sysdb_store_domuser(subdomain, "subdomuser", NULL, 12345, 0,
- "Sub Domain User", "/home/subdomuser", "/bin/bash",
- NULL, NULL, -1, 0);
+ ret = sysdb_store_user(subdomain->sysdb, subdomain, "subdomuser",
+ NULL, 12345, 0, "Sub Domain User",
+ "/home/subdomuser", "/bin/bash",
+ NULL, NULL, NULL, -1, 0);
fail_unless(ret == EOK, "sysdb_store_domuser failed.");
check_dn = ldb_dn_new(test_ctx, test_ctx->sysdb->ldb,