summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-11-15 14:41:33 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-11-15 15:52:09 -0500
commit3fa7380908997eda5e45c5f4d6b512a954d3bc3c (patch)
tree0ea430faebc0ea1b486b047e4cd87f9d9698a6ec
parent1ebddb7c2498f715f108b8721fa5fc8d4892e14d (diff)
downloadsssd-3fa7380908997eda5e45c5f4d6b512a954d3bc3c.tar.gz
sssd-3fa7380908997eda5e45c5f4d6b512a954d3bc3c.tar.xz
sssd-3fa7380908997eda5e45c5f4d6b512a954d3bc3c.zip
Fix const cast warning for sysdb_update_members
-rw-r--r--src/db/sysdb.h4
-rw-r--r--src/db/sysdb_ops.c4
-rw-r--r--src/providers/ldap/sdap_async_accounts.c12
-rw-r--r--src/tests/sysdb-tests.c8
4 files changed, 14 insertions, 14 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index fde27b93e..f93f34e62 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -548,8 +548,8 @@ errno_t sysdb_update_members(struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
const char *member,
enum sysdb_member_type type,
- const char **add_groups,
- const char **del_groups);
+ const char *const *add_groups,
+ const char *const *del_groups);
errno_t sysdb_add_netgroup_tuple(struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 7158da377..19f43c6c0 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -2573,8 +2573,8 @@ errno_t sysdb_update_members(struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
const char *member,
enum sysdb_member_type type,
- const char **add_groups,
- const char **del_groups)
+ const char *const *add_groups,
+ const char *const *del_groups)
{
errno_t ret;
int i;
diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c
index a4d15d677..9856e7548 100644
--- a/src/providers/ldap/sdap_async_accounts.c
+++ b/src/providers/ldap/sdap_async_accounts.c
@@ -2023,8 +2023,8 @@ static void sdap_initgr_rfc2307_process(struct tevent_req *subreq)
ret = sysdb_update_members(state->sysdb, state->dom, state->name,
SYSDB_MEMBER_USER,
- (const char **)add_groups,
- (const char **)del_groups);
+ (const char *const *)add_groups,
+ (const char *const *)del_groups);
if (ret != EOK) {
tevent_req_error(req, ret);
return;
@@ -3350,8 +3350,8 @@ errno_t save_rfc2307bis_user_memberships(
ret = sysdb_update_members(state->sysdb, state->dom, state->name,
SYSDB_MEMBER_USER,
- (const char **)add_groups,
- (const char **)del_groups);
+ (const char *const *)add_groups,
+ (const char *const *)del_groups);
if (ret != EOK) {
goto error;
}
@@ -3821,8 +3821,8 @@ static errno_t rfc2307bis_nested_groups_update_sysdb(
ret = sysdb_update_members(state->sysdb, state->dom, name,
SYSDB_MEMBER_GROUP,
- (const char **)add_groups,
- (const char **)del_groups);
+ (const char *const *)add_groups,
+ (const char *const *)del_groups);
if (ret != EOK) {
goto error;
}
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index f8710a1c5..77409c3ef 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -2220,7 +2220,7 @@ START_TEST (test_sysdb_update_members)
ret = sysdb_update_members(test_ctx->sysdb, test_ctx->domain, user,
SYSDB_MEMBER_USER,
- (const char **)add_groups, NULL);
+ (const char *const *)add_groups, NULL);
fail_unless(ret == EOK, "Could not add groups");
talloc_zfree(add_groups);
@@ -2234,8 +2234,8 @@ START_TEST (test_sysdb_update_members)
ret = sysdb_update_members(test_ctx->sysdb, test_ctx->domain, user,
SYSDB_MEMBER_USER,
- (const char **)add_groups,
- (const char **)del_groups);
+ (const char *const *)add_groups,
+ (const char *const *)del_groups);
fail_unless(ret == EOK, "Group replace failed");
talloc_zfree(add_groups);
talloc_zfree(del_groups);
@@ -2249,7 +2249,7 @@ START_TEST (test_sysdb_update_members)
ret = sysdb_update_members(test_ctx->sysdb, test_ctx->domain,
user, SYSDB_MEMBER_USER,
NULL,
- (const char **)del_groups);
+ (const char *const *)del_groups);
fail_unless(ret == EOK, "Could not remove groups");
talloc_zfree(test_ctx);