Rename subsystem_DEPRECATED to subsystem_DEPRECATED_FUNCTION(X)
Start to explain what the replacement function is. Generate the #define/#undef logic in generated header files. Use gcc style where the deprecation warning is after the prototype.
This commit is contained in:
@@ -31,8 +31,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define KRB5_DEPRECATED
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
#undef __attribute__
|
||||
@@ -51,9 +49,9 @@
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_data_contents(krb5_context context, krb5_data *data)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_data_free(data);
|
||||
}
|
||||
@@ -64,12 +62,12 @@ krb5_free_data_contents(krb5_context context, krb5_data *data)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_keytype_to_enctypes_default (krb5_context context,
|
||||
krb5_keytype keytype,
|
||||
unsigned *len,
|
||||
krb5_enctype **val)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
unsigned int i, n;
|
||||
krb5_enctype *ret;
|
||||
@@ -114,11 +112,11 @@ static int num_keys = sizeof(keys) / sizeof(keys[0]);
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_keytype_to_string(krb5_context context,
|
||||
krb5_keytype keytype,
|
||||
char **string)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
const char *name = NULL;
|
||||
int i;
|
||||
@@ -151,11 +149,11 @@ krb5_keytype_to_string(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_keytype(krb5_context context,
|
||||
const char *string,
|
||||
krb5_keytype *keytype)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
char *end;
|
||||
int i;
|
||||
@@ -184,13 +182,13 @@ krb5_string_to_keytype(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV
|
||||
krb5_password_key_proc (krb5_context context,
|
||||
krb5_enctype type,
|
||||
krb5_salt salt,
|
||||
krb5_const_pointer keyseed,
|
||||
krb5_keyblock **key)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_error_code ret;
|
||||
const char *password = (const char *)keyseed;
|
||||
@@ -220,7 +218,6 @@ krb5_password_key_proc (krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_in_tkt_with_password (krb5_context context,
|
||||
krb5_flags options,
|
||||
@@ -231,6 +228,7 @@ krb5_get_in_tkt_with_password (krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
krb5_creds *creds,
|
||||
krb5_kdc_rep *ret_as_reply)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
return krb5_get_in_tkt (context,
|
||||
options,
|
||||
@@ -262,7 +260,6 @@ krb5_skey_key_proc (krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_in_tkt_with_skey (krb5_context context,
|
||||
krb5_flags options,
|
||||
@@ -273,6 +270,7 @@ krb5_get_in_tkt_with_skey (krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
krb5_creds *creds,
|
||||
krb5_kdc_rep *ret_as_reply)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
if(key == NULL)
|
||||
return krb5_get_in_tkt_with_keytab (context,
|
||||
@@ -305,13 +303,13 @@ krb5_get_in_tkt_with_skey (krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV
|
||||
krb5_keytab_key_proc (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
krb5_salt salt,
|
||||
krb5_const_pointer keyseed,
|
||||
krb5_keyblock **key)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_keytab_key_proc_args *args = rk_UNCONST(keyseed);
|
||||
krb5_keytab keytab = args->keytab;
|
||||
@@ -345,7 +343,6 @@ krb5_keytab_key_proc (krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_in_tkt_with_keytab (krb5_context context,
|
||||
krb5_flags options,
|
||||
@@ -356,6 +353,7 @@ krb5_get_in_tkt_with_keytab (krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
krb5_creds *creds,
|
||||
krb5_kdc_rep *ret_as_reply)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_keytab_key_proc_args a;
|
||||
|
||||
@@ -387,11 +385,11 @@ krb5_get_in_tkt_with_keytab (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_gen_new(krb5_context context,
|
||||
const krb5_cc_ops *ops,
|
||||
krb5_ccache *id)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
return krb5_cc_new_unique(context, ops->prefix, NULL, id);
|
||||
}
|
||||
@@ -402,10 +400,10 @@ krb5_cc_gen_new(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_realm * KRB5_LIB_CALL
|
||||
krb5_princ_realm(krb5_context context,
|
||||
krb5_principal principal)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
return &principal->realm;
|
||||
}
|
||||
@@ -417,11 +415,11 @@ krb5_princ_realm(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_princ_set_realm(krb5_context context,
|
||||
krb5_principal principal,
|
||||
krb5_realm *realm)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
principal->realm = *realm;
|
||||
}
|
||||
@@ -433,9 +431,9 @@ krb5_princ_set_realm(krb5_context context,
|
||||
*/
|
||||
|
||||
/* keep this for compatibility with older code */
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_creds_contents (krb5_context context, krb5_creds *c)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
return krb5_free_cred_contents (context, c);
|
||||
}
|
||||
@@ -451,9 +449,9 @@ krb5_free_creds_contents (krb5_context context, krb5_creds *c)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_error_string(krb5_context context, char *str)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_free_error_message(context, str);
|
||||
}
|
||||
@@ -471,10 +469,10 @@ krb5_free_error_string(krb5_context context, char *str)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_error_string(krb5_context context, const char *fmt, ...)
|
||||
__attribute__((format (printf, 2, 3)))
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
@@ -498,10 +496,10 @@ krb5_set_error_string(krb5_context context, const char *fmt, ...)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vset_error_string(krb5_context context, const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 2, 0)))
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_vset_error_message(context, 0, fmt, args);
|
||||
return 0;
|
||||
@@ -517,9 +515,9 @@ krb5_vset_error_string(krb5_context context, const char *fmt, va_list args)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_clear_error_string(krb5_context context)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_clear_error_message(context);
|
||||
}
|
||||
@@ -530,7 +528,6 @@ krb5_clear_error_string(krb5_context context)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_cred_from_kdc_opt(krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
@@ -538,6 +535,7 @@ krb5_get_cred_from_kdc_opt(krb5_context context,
|
||||
krb5_creds **out_creds,
|
||||
krb5_creds ***ret_tgts,
|
||||
krb5_flags flags)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_kdc_flags f;
|
||||
f.i = flags;
|
||||
@@ -552,13 +550,13 @@ krb5_get_cred_from_kdc_opt(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_cred_from_kdc(krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
krb5_creds *in_creds,
|
||||
krb5_creds **out_creds,
|
||||
krb5_creds ***ret_tgts)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
return krb5_get_cred_from_kdc_opt(context, ccache,
|
||||
in_creds, out_creds, ret_tgts, 0);
|
||||
@@ -570,9 +568,9 @@ krb5_get_cred_from_kdc(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_unparsed_name(krb5_context context, char *str)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
krb5_xfree(str);
|
||||
}
|
||||
@@ -583,11 +581,11 @@ krb5_free_unparsed_name(krb5_context context, char *str)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_generate_subkey(krb5_context context,
|
||||
const krb5_keyblock *key,
|
||||
krb5_keyblock **subkey)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
return krb5_generate_subkey_extended(context, key, ETYPE_NULL, subkey);
|
||||
}
|
||||
@@ -598,11 +596,11 @@ krb5_generate_subkey(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
KRB5_DEPRECATED
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_getremoteseqnumber(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t *seqnumber)
|
||||
KRB5_DEPRECATED_FUNCTION("Use X instead")
|
||||
{
|
||||
*seqnumber = auth_context->remote_seqnumber;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user