diff options
author | Tom Yu <tlyu@mit.edu> | 2016-04-28 16:44:21 -0400 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2016-04-28 18:29:44 -0400 |
commit | 585e8ce503f3b74268059384f07ad9cccf377d49 (patch) | |
tree | b6f879b0319bfc3a7455366df44d68f69f2c7e15 /src/util | |
parent | 12cc2b9dab45b05c13642c2b4b0ce0d3191663c7 (diff) | |
download | krb5-585e8ce503f3b74268059384f07ad9cccf377d49.zip krb5-585e8ce503f3b74268059384f07ad9cccf377d49.tar.gz krb5-585e8ce503f3b74268059384f07ad9cccf377d49.tar.bz2 |
Unconstify some krb5 GSS OIDs
gssapi_krb5.h declared some well-known OID constants as pointers to
const gss_OID_desc, which can't be assigned to application-declared
gss_OID variables or passed to GSSAPI functions without causing
warnings.
Declare these OID constants without the const qualifier on
gss_OID_desc, at the expense of some type safety. (Fixing this
"correctly" probably requires some standards revision.)
ticket: 8399 (new)
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/gss-kernel-lib/kernel_gss.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/gss-kernel-lib/kernel_gss.c b/src/util/gss-kernel-lib/kernel_gss.c index f7a6ae1..2895d05 100644 --- a/src/util/gss-kernel-lib/kernel_gss.c +++ b/src/util/gss-kernel-lib/kernel_gss.c @@ -37,8 +37,9 @@ static const gss_OID_desc oid_array[] = { {GSS_MECH_KRB5_OID_LENGTH, GSS_MECH_KRB5_OID}, {GSS_MECH_KRB5_OLD_OID_LENGTH, GSS_MECH_KRB5_OLD_OID} }; -const gss_OID_desc *const gss_mech_krb5 = oid_array+0; -const gss_OID_desc *const gss_mech_krb5_old = oid_array+1; +#define oids ((gss_OID)oid_array) +const gss_OID gss_mech_krb5 = &oids[0]; +const gss_OID gss_mech_krb5_old = &oids[1]; /* Create a key from key data in a lucid context. */ static krb5_error_code |