summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-10-15 12:10:38 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-10-17 13:17:26 +0200
commit89e890c034474fcd6e5bf7148ab0c44a6b2477d5 (patch)
tree5a12421baa9277adc7a40cd1014d5a7fb02fa709 /src
parentfe4e8444d47e4268c11a681b6cd4dd8b0840a168 (diff)
downloadsssd-89e890c034474fcd6e5bf7148ab0c44a6b2477d5.tar.gz
sssd-89e890c034474fcd6e5bf7148ab0c44a6b2477d5.tar.bz2
sssd-89e890c034474fcd6e5bf7148ab0c44a6b2477d5.zip
heimdal: Rename krb5_realm since thats a type in heimdal
Fixes -Wshadow warning. find -name '*.c' -exec sed -i \ -e 's/\([^"_]\)krb5_realm\([^"_]\)/\1krb5_realm_str\2/' \ -e 's/\(Missing krb5_realm\)_str/\1/' \ -e 's/\(No explicit krb5_realm\)_str/\1' {} +
Diffstat (limited to 'src')
-rw-r--r--src/providers/ad/ad_common.c26
-rw-r--r--src/providers/krb5/krb5_common.c16
-rw-r--r--src/providers/krb5/krb5_init.c10
-rw-r--r--src/providers/ldap/ldap_common.c24
4 files changed, 38 insertions, 38 deletions
diff --git a/src/providers/ad/ad_common.c b/src/providers/ad/ad_common.c
index ab62d64a..7b9e5137 100644
--- a/src/providers/ad/ad_common.c
+++ b/src/providers/ad/ad_common.c
@@ -525,7 +525,7 @@ errno_t
ad_failover_init(TALLOC_CTX *mem_ctx, struct be_ctx *bectx,
const char *primary_servers,
const char *backup_servers,
- const char *krb5_realm,
+ const char *krb5_realm_str,
const char *ad_service,
const char *ad_gc_service,
const char *ad_domain,
@@ -585,13 +585,13 @@ ad_failover_init(TALLOC_CTX *mem_ctx, struct be_ctx *bectx,
service->sdap->kinit_service_name = service->krb5_service->name;
service->gc->kinit_service_name = service->krb5_service->name;
- if (!krb5_realm) {
+ if (!krb5_realm_str) {
DEBUG(SSSDBG_CRIT_FAILURE, ("No Kerberos realm set\n"));
ret = EINVAL;
goto done;
}
service->krb5_service->realm =
- talloc_strdup(service->krb5_service, krb5_realm);
+ talloc_strdup(service->krb5_service, krb5_realm_str);
if (!service->krb5_service->realm) {
ret = ENOMEM;
goto done;
@@ -795,7 +795,7 @@ ad_set_ad_id_options(struct ad_options *ad_opts,
struct sdap_options *id_opts)
{
errno_t ret;
- char *krb5_realm;
+ char *krb5_realm_str;
char *keytab_path;
/* We only support Kerberos password policy with AD, so
@@ -810,20 +810,20 @@ ad_set_ad_id_options(struct ad_options *ad_opts,
}
/* Set the Kerberos Realm for GSSAPI */
- krb5_realm = dp_opt_get_string(ad_opts->basic, AD_KRB5_REALM);
- if (!krb5_realm) {
+ krb5_realm_str = dp_opt_get_string(ad_opts->basic, AD_KRB5_REALM);
+ if (!krb5_realm_str) {
/* Should be impossible, this is set in ad_get_common_options() */
DEBUG(SSSDBG_FATAL_FAILURE, ("No Kerberos realm\n"));
ret = EINVAL;
goto done;
}
- ret = dp_opt_set_string(id_opts->basic, SDAP_KRB5_REALM, krb5_realm);
+ ret = dp_opt_set_string(id_opts->basic, SDAP_KRB5_REALM, krb5_realm_str);
if (ret != EOK) goto done;
DEBUG(SSSDBG_CONF_SETTINGS,
("Option %s set to %s\n",
id_opts->basic[SDAP_KRB5_REALM].opt_name,
- krb5_realm));
+ krb5_realm_str));
keytab_path = dp_opt_get_string(ad_opts->basic, AD_KEYTAB);
if (keytab_path) {
@@ -983,7 +983,7 @@ ad_get_auth_options(TALLOC_CTX *mem_ctx,
errno_t ret;
struct dp_option *krb5_options;
const char *ad_servers;
- const char *krb5_realm;
+ const char *krb5_realm_str;
TALLOC_CTX *tmp_ctx = talloc_new(NULL);
if (!tmp_ctx) return ENOMEM;
@@ -1010,8 +1010,8 @@ ad_get_auth_options(TALLOC_CTX *mem_ctx,
/* Set krb5 realm */
/* Set the Kerberos Realm for GSSAPI */
- krb5_realm = dp_opt_get_string(ad_opts->basic, AD_KRB5_REALM);
- if (!krb5_realm) {
+ krb5_realm_str = dp_opt_get_string(ad_opts->basic, AD_KRB5_REALM);
+ if (!krb5_realm_str) {
/* Should be impossible, this is set in ad_get_common_options() */
DEBUG(SSSDBG_FATAL_FAILURE, ("No Kerberos realm\n"));
ret = EINVAL;
@@ -1021,12 +1021,12 @@ ad_get_auth_options(TALLOC_CTX *mem_ctx,
/* Force the kerberos realm to match the AD_KRB5_REALM (which may have
* been upper-cased in ad_common_options()
*/
- ret = dp_opt_set_string(krb5_options, KRB5_REALM, krb5_realm);
+ ret = dp_opt_set_string(krb5_options, KRB5_REALM, krb5_realm_str);
if (ret != EOK) goto done;
DEBUG(SSSDBG_CONF_SETTINGS,
("Option %s set to %s\n",
krb5_options[KRB5_REALM].opt_name,
- krb5_realm));
+ krb5_realm_str));
/* Set flag that controls whether we want to write the
* kdcinfo files at all
diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c
index 63d81d6d..4ab359e8 100644
--- a/src/providers/krb5/krb5_common.c
+++ b/src/providers/krb5/krb5_common.c
@@ -895,7 +895,7 @@ errno_t krb5_install_offline_callback(struct be_ctx *be_ctx,
{
int ret;
struct remove_info_files_ctx *ctx;
- const char *krb5_realm;
+ const char *krb5_realm_str;
if (krb5_ctx->service == NULL || krb5_ctx->service->name == NULL) {
DEBUG(1, ("Missing KDC service name!\n"));
@@ -908,14 +908,14 @@ errno_t krb5_install_offline_callback(struct be_ctx *be_ctx,
return ENOMEM;
}
- krb5_realm = dp_opt_get_cstring(krb5_ctx->opts, KRB5_REALM);
- if (krb5_realm == NULL) {
+ krb5_realm_str = dp_opt_get_cstring(krb5_ctx->opts, KRB5_REALM);
+ if (krb5_realm_str == NULL) {
DEBUG(1, ("Missing krb5_realm option!\n"));
ret = EINVAL;
goto done;
}
- ctx->realm = talloc_strdup(ctx, krb5_realm);
+ ctx->realm = talloc_strdup(ctx, krb5_realm_str);
if (ctx->realm == NULL) {
DEBUG(1, ("talloc_strdup failed!\n"));
ret = ENOMEM;
@@ -950,19 +950,19 @@ done:
errno_t krb5_install_sigterm_handler(struct tevent_context *ev,
struct krb5_ctx *krb5_ctx)
{
- const char *krb5_realm;
+ const char *krb5_realm_str;
char *sig_realm;
struct tevent_signal *sige;
BlockSignals(false, SIGTERM);
- krb5_realm = dp_opt_get_cstring(krb5_ctx->opts, KRB5_REALM);
- if (krb5_realm == NULL) {
+ krb5_realm_str = dp_opt_get_cstring(krb5_ctx->opts, KRB5_REALM);
+ if (krb5_realm_str == NULL) {
DEBUG(1, ("Missing krb5_realm option!\n"));
return EINVAL;
}
- sig_realm = talloc_strdup(krb5_ctx, krb5_realm);
+ sig_realm = talloc_strdup(krb5_ctx, krb5_realm_str);
if (sig_realm == NULL) {
DEBUG(1, ("talloc_strdup failed!\n"));
return ENOMEM;
diff --git a/src/providers/krb5/krb5_init.c b/src/providers/krb5/krb5_init.c
index 91f701a1..fb7304b6 100644
--- a/src/providers/krb5/krb5_init.c
+++ b/src/providers/krb5/krb5_init.c
@@ -64,7 +64,7 @@ int sssm_krb5_auth_init(struct be_ctx *bectx,
const char *krb5_backup_servers;
const char *krb5_kpasswd_servers;
const char *krb5_backup_kpasswd_servers;
- const char *krb5_realm;
+ const char *krb5_realm_str;
const char *errstr;
int errval;
int errpos;
@@ -103,15 +103,15 @@ int sssm_krb5_auth_init(struct be_ctx *bectx,
krb5_servers = dp_opt_get_string(ctx->opts, KRB5_KDC);
krb5_backup_servers = dp_opt_get_string(ctx->opts, KRB5_BACKUP_KDC);
- krb5_realm = dp_opt_get_string(ctx->opts, KRB5_REALM);
- if (krb5_realm == NULL) {
+ krb5_realm_str = dp_opt_get_string(ctx->opts, KRB5_REALM);
+ if (krb5_realm_str == NULL) {
DEBUG(0, ("Missing krb5_realm option!\n"));
return EINVAL;
}
ret = krb5_service_init(ctx, bectx,
SSS_KRB5KDC_FO_SRV, krb5_servers,
- krb5_backup_servers, krb5_realm,
+ krb5_backup_servers, krb5_realm_str,
dp_opt_get_bool(krb5_options->opts,
KRB5_USE_KDCINFO),
&ctx->service);
@@ -137,7 +137,7 @@ int sssm_krb5_auth_init(struct be_ctx *bectx,
} else {
ret = krb5_service_init(ctx, bectx,
SSS_KRB5KPASSWD_FO_SRV, krb5_kpasswd_servers,
- krb5_backup_kpasswd_servers, krb5_realm,
+ krb5_backup_kpasswd_servers, krb5_realm_str,
dp_opt_get_bool(krb5_options->opts,
KRB5_USE_KDCINFO),
&ctx->kpasswd_service);
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index b3a048c1..a50a072d 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -1261,7 +1261,7 @@ done:
static const char *
sdap_gssapi_get_default_realm(TALLOC_CTX *mem_ctx)
{
- char *krb5_realm = NULL;
+ char *krb5_realm_str = NULL;
const char *realm = NULL;
krb5_error_code krberr;
krb5_context context = NULL;
@@ -1272,15 +1272,15 @@ sdap_gssapi_get_default_realm(TALLOC_CTX *mem_ctx)
goto done;
}
- krberr = krb5_get_default_realm(context, &krb5_realm);
+ krberr = krb5_get_default_realm(context, &krb5_realm_str);
if (krberr) {
DEBUG(2, ("Failed to get default realm name: %s\n",
sss_krb5_get_error_message(context, krberr)));
goto done;
}
- realm = talloc_strdup(mem_ctx, krb5_realm);
- krb5_free_default_realm(context, krb5_realm);
+ realm = talloc_strdup(mem_ctx, krb5_realm_str);
+ krb5_free_default_realm(context, krb5_realm_str);
if (!realm) {
DEBUG(0, ("Out of memory\n"));
goto done;
@@ -1301,7 +1301,7 @@ int sdap_gssapi_init(TALLOC_CTX *mem_ctx,
int ret;
const char *krb5_servers;
const char *krb5_backup_servers;
- const char *krb5_realm;
+ const char *krb5_realm_str;
const char *krb5_opt_realm;
struct krb5_service *service = NULL;
TALLOC_CTX *tmp_ctx;
@@ -1315,15 +1315,15 @@ int sdap_gssapi_init(TALLOC_CTX *mem_ctx,
krb5_opt_realm = dp_opt_get_string(opts, SDAP_KRB5_REALM);
if (krb5_opt_realm == NULL) {
DEBUG(2, ("Missing krb5_realm option, will use libkrb default\n"));
- krb5_realm = sdap_gssapi_get_default_realm(tmp_ctx);
- if (krb5_realm == NULL) {
+ krb5_realm_str = sdap_gssapi_get_default_realm(tmp_ctx);
+ if (krb5_realm_str == NULL) {
DEBUG(0, ("Cannot determine the Kerberos realm, aborting\n"));
ret = EIO;
goto done;
}
} else {
- krb5_realm = talloc_strdup(tmp_ctx, krb5_opt_realm);
- if (krb5_realm == NULL) {
+ krb5_realm_str = talloc_strdup(tmp_ctx, krb5_opt_realm);
+ if (krb5_realm_str == NULL) {
ret = ENOMEM;
goto done;
}
@@ -1331,7 +1331,7 @@ int sdap_gssapi_init(TALLOC_CTX *mem_ctx,
ret = krb5_service_init(mem_ctx, bectx,
SSS_KRB5KDC_FO_SRV, krb5_servers,
- krb5_backup_servers, krb5_realm,
+ krb5_backup_servers, krb5_realm_str,
dp_opt_get_bool(opts,
SDAP_KRB5_USE_KDCINFO),
&service);
@@ -1340,14 +1340,14 @@ int sdap_gssapi_init(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = sdap_install_sigterm_handler(mem_ctx, bectx->ev, krb5_realm);
+ ret = sdap_install_sigterm_handler(mem_ctx, bectx->ev, krb5_realm_str);
if (ret != EOK) {
DEBUG(0, ("Failed to install sigterm handler\n"));
goto done;
}
ret = sdap_install_offline_callback(mem_ctx, bectx,
- krb5_realm, SSS_KRB5KDC_FO_SRV);
+ krb5_realm_str, SSS_KRB5KDC_FO_SRV);
if (ret != EOK) {
DEBUG(0, ("Failed to install sigterm handler\n"));
goto done;