krb5/get_host_realm.c: Sprinkle const on global data never changed.
This commit is contained in:

committed by
Nico Williams

parent
5d9723d52d
commit
cf0418d6fc
@@ -109,17 +109,17 @@ dns_find_realm(krb5_context context,
|
|||||||
const char *domain,
|
const char *domain,
|
||||||
krb5_realm **realms)
|
krb5_realm **realms)
|
||||||
{
|
{
|
||||||
static const char *default_labels[] = { "_kerberos", NULL };
|
static const char *const default_labels[] = { "_kerberos", NULL };
|
||||||
char dom[MAXHOSTNAMELEN];
|
char dom[MAXHOSTNAMELEN];
|
||||||
struct rk_dns_reply *r;
|
struct rk_dns_reply *r;
|
||||||
const char **labels;
|
const char *const *labels;
|
||||||
char **config_labels;
|
char **config_labels;
|
||||||
int i, ret = 0;
|
int i, ret = 0;
|
||||||
|
|
||||||
config_labels = krb5_config_get_strings(context, NULL, "libdefaults",
|
config_labels = krb5_config_get_strings(context, NULL, "libdefaults",
|
||||||
"dns_lookup_realm_labels", NULL);
|
"dns_lookup_realm_labels", NULL);
|
||||||
if(config_labels != NULL)
|
if(config_labels != NULL)
|
||||||
labels = (const char **)config_labels;
|
labels = (const char *const *)config_labels;
|
||||||
else
|
else
|
||||||
labels = default_labels;
|
labels = default_labels;
|
||||||
if(*domain == '.')
|
if(*domain == '.')
|
||||||
|
Reference in New Issue
Block a user