summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-05 13:42:05 -0700
committerJeremy Allison <jra@samba.org>2011-05-05 23:56:07 +0200
commite131c94ac1b06cc49b1c25717d3496dba8b0b3df (patch)
treeb5aea6c90a1d73c3688591a54d3a92773c95a4e7 /nsswitch
parent38492b16fee29f31b324ec459069470e977a2359 (diff)
downloadsamba-e131c94ac1b06cc49b1c25717d3496dba8b0b3df.tar.gz
samba-e131c94ac1b06cc49b1c25717d3496dba8b0b3df.tar.bz2
samba-e131c94ac1b06cc49b1c25717d3496dba8b0b3df.zip
More const fixes for compiler warnings from the waf build.
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/libwbclient/tests/wbclient.c2
-rw-r--r--nsswitch/pam_winbind.c28
2 files changed, 15 insertions, 15 deletions
diff --git a/nsswitch/libwbclient/tests/wbclient.c b/nsswitch/libwbclient/tests/wbclient.c
index c6ee531481..12fc31ea5e 100644
--- a/nsswitch/libwbclient/tests/wbclient.c
+++ b/nsswitch/libwbclient/tests/wbclient.c
@@ -395,7 +395,7 @@ static bool test_wbc_lookup_rids(struct torture_context *tctx)
torture_assert_str_equal(
tctx, names[1], "Users", "S-1-5-32-545 not mapped to 'Users'");
- wbcFreeMemory((char *)domain_name);
+ wbcFreeMemory(discard_const_p(char ,domain_name));
wbcFreeMemory(names);
wbcFreeMemory(types);
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 7005c25fae..a385e744cc 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -412,51 +412,51 @@ static int _pam_parse(const pam_handle_t *pamh,
config_file = PAM_WINBIND_CONFIG_FILE;
}
- d = iniparser_load(CONST_DISCARD(char *, config_file));
+ d = iniparser_load(discard_const_p(char, config_file));
if (d == NULL) {
goto config_from_pam;
}
- if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:debug"), false)) {
+ if (iniparser_getboolean(d, discard_const_p(char, "global:debug"), false)) {
ctrl |= WINBIND_DEBUG_ARG;
}
- if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:debug_state"), false)) {
+ if (iniparser_getboolean(d, discard_const_p(char, "global:debug_state"), false)) {
ctrl |= WINBIND_DEBUG_STATE;
}
- if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:cached_login"), false)) {
+ if (iniparser_getboolean(d, discard_const_p(char, "global:cached_login"), false)) {
ctrl |= WINBIND_CACHED_LOGIN;
}
- if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:krb5_auth"), false)) {
+ if (iniparser_getboolean(d, discard_const_p(char, "global:krb5_auth"), false)) {
ctrl |= WINBIND_KRB5_AUTH;
}
- if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:silent"), false)) {
+ if (iniparser_getboolean(d, discard_const_p(char, "global:silent"), false)) {
ctrl |= WINBIND_SILENT;
}
- if (iniparser_getstr(d, CONST_DISCARD(char *, "global:krb5_ccache_type")) != NULL) {
+ if (iniparser_getstr(d, discard_const_p(char, "global:krb5_ccache_type")) != NULL) {
ctrl |= WINBIND_KRB5_CCACHE_TYPE;
}
- if ((iniparser_getstr(d, CONST_DISCARD(char *, "global:require-membership-of"))
+ if ((iniparser_getstr(d, discard_const_p(char, "global:require-membership-of"))
!= NULL) ||
- (iniparser_getstr(d, CONST_DISCARD(char *, "global:require_membership_of"))
+ (iniparser_getstr(d, discard_const_p(char, "global:require_membership_of"))
!= NULL)) {
ctrl |= WINBIND_REQUIRED_MEMBERSHIP;
}
- if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:try_first_pass"), false)) {
+ if (iniparser_getboolean(d, discard_const_p(char, "global:try_first_pass"), false)) {
ctrl |= WINBIND_TRY_FIRST_PASS_ARG;
}
- if (iniparser_getint(d, CONST_DISCARD(char *, "global:warn_pwd_expire"), 0)) {
+ if (iniparser_getint(d, discard_const_p(char, "global:warn_pwd_expire"), 0)) {
ctrl |= WINBIND_WARN_PWD_EXPIRE;
}
- if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:mkhomedir"), false)) {
+ if (iniparser_getboolean(d, discard_const_p(char, "global:mkhomedir"), false)) {
ctrl |= WINBIND_MKHOMEDIR;
}
@@ -1764,7 +1764,7 @@ static int winbind_auth_request(struct pwb_context *ctx,
&logon.blobs,
"krb5_cc_type",
0,
- (uint8_t *)cctype,
+ discard_const_p(uint8_t, cctype),
strlen(cctype)+1);
if (!WBC_ERROR_IS_OK(wbc_status)) {
goto done;
@@ -2514,7 +2514,7 @@ static int _pam_delete_cred(pam_handle_t *pamh, int flags,
&logoff.blobs,
"ccfilename",
0,
- (uint8_t *)ccname,
+ discard_const_p(uint8_t, ccname),
strlen(ccname)+1);
if (!WBC_ERROR_IS_OK(wbc_status)) {
goto out;