From: Steve G. <sg...@re...> - 2014-03-18 22:06:55
|
Hello, I have a bz report, 1066460, which mentions a symbol collision on list_init. Since this is a library, I would expect it to be name spaced so that apps linking to it don't have problems, This was reported to the trousers bug tracker, too: http://sourceforge.net/p/trousers/bugs/106/ This patch changes the symbol name. Signed-off-by: Steve Grubb <sg...@re...> ----- diff -urp trousers-0.3.11.2.orig/src/include/obj_context.h trousers-0.3.11.2/src/include/obj_context.h --- trousers-0.3.11.2.orig/src/include/obj_context.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_context.h 2014-03-18 17:10:39.758287052 -0400 @@ -86,7 +86,7 @@ struct tcs_api_table *obj_context_get_tc #define CONTEXT_LIST_DECLARE struct obj_list context_list #define CONTEXT_LIST_DECLARE_EXTERN extern struct obj_list context_list -#define CONTEXT_LIST_INIT() list_init(&context_list) +#define CONTEXT_LIST_INIT() tspi_list_init(&context_list) #define CONTEXT_LIST_CONNECT(a,b) obj_connectContext_list(&context_list, a, b) #define CONTEXT_LIST_CLOSE(a) obj_list_close(&context_list, &__tspi_obj_context_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_daaarakey.h trousers-0.3.11.2/src/include/obj_daaarakey.h --- trousers-0.3.11.2.orig/src/include/obj_daaarakey.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_daaarakey.h 2014-03-18 17:10:07.016289809 -0400 @@ -32,7 +32,7 @@ TSS_RESULT obj_daaarakey_set_session_han #define DAAARAKEY_LIST_DECLARE struct obj_list daaarakey_list #define DAAARAKEY_LIST_DECLARE_EXTERN extern struct obj_list daaarakey_list -#define DAAARAKEY_LIST_INIT() list_init(&daaarakey_list) +#define DAAARAKEY_LIST_INIT() tspi_list_init(&daaarakey_list) #define DAAARAKEY_LIST_CONNECT(a,b) obj_connectContext_list(&daaarakey_list, a, b) #define DAAARAKEY_LIST_CLOSE(a) obj_list_close(&daaarakey_list, &daaarakey_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_daacred.h trousers-0.3.11.2/src/include/obj_daacred.h --- trousers-0.3.11.2.orig/src/include/obj_daacred.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_daacred.h 2014-03-18 17:08:19.599298854 -0400 @@ -32,7 +32,7 @@ TSS_RESULT obj_daacred_set_session_handl #define DAACRED_LIST_DECLARE struct obj_list daacred_list #define DAACRED_LIST_DECLARE_EXTERN extern struct obj_list daacred_list -#define DAACRED_LIST_INIT() list_init(&daacred_list) +#define DAACRED_LIST_INIT() tspi_list_init(&daacred_list) #define DAACRED_LIST_CONNECT(a,b) obj_connectContext_list(&daacred_list, a, b) #define DAACRED_LIST_CLOSE(a) obj_list_close(&daacred_list, &daacred_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_daa.h trousers-0.3.11.2/src/include/obj_daa.h --- trousers-0.3.11.2.orig/src/include/obj_daa.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_daa.h 2014-03-18 17:08:48.074296456 -0400 @@ -32,7 +32,7 @@ TSS_RESULT obj_daa_set_session_handle(TS #define DAA_LIST_DECLARE struct obj_list daa_list #define DAA_LIST_DECLARE_EXTERN extern struct obj_list daa_list -#define DAA_LIST_INIT() list_init(&daa_list) +#define DAA_LIST_INIT() tspi_list_init(&daa_list) #define DAA_LIST_CONNECT(a,b) obj_connectContext_list(&daa_list, a, b) #define DAA_LIST_CLOSE(a) obj_list_close(&daa_list, &daa_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_daaissuerkey.h trousers-0.3.11.2/src/include/obj_daaissuerkey.h --- trousers-0.3.11.2.orig/src/include/obj_daaissuerkey.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_daaissuerkey.h 2014-03-18 17:07:19.937303877 -0400 @@ -32,7 +32,7 @@ TSS_RESULT obj_daaissuerkey_set_session_ #define DAAISSUERKEY_LIST_DECLARE struct obj_list daaissuerkey_list #define DAAISSUERKEY_LIST_DECLARE_EXTERN extern struct obj_list daaissuerkey_list -#define DAAISSUERKEY_LIST_INIT() list_init(&daaissuerkey_list) +#define DAAISSUERKEY_LIST_INIT() tspi_list_init(&daaissuerkey_list) #define DAAISSUERKEY_LIST_CONNECT(a,b) obj_connectContext_list(&daaissuerkey_list, a, b) #define DAAISSUERKEY_LIST_CLOSE(a) obj_list_close(&daaissuerkey_list, \ &daaissuerkey_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_delfamily.h trousers-0.3.11.2/src/include/obj_delfamily.h --- trousers-0.3.11.2.orig/src/include/obj_delfamily.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_delfamily.h 2014-03-18 17:07:58.435300636 -0400 @@ -45,7 +45,7 @@ TSS_RESULT obj_delfamily_get_label(TSS_H #define DELFAMILY_LIST_DECLARE struct obj_list delfamily_list #define DELFAMILY_LIST_DECLARE_EXTERN extern struct obj_list delfamily_list -#define DELFAMILY_LIST_INIT() list_init(&delfamily_list) +#define DELFAMILY_LIST_INIT() tspi_list_init(&delfamily_list) #define DELFAMILY_LIST_CONNECT(a,b) obj_connectContext_list(&delfamily_list, a, b) #define DELFAMILY_LIST_CLOSE(a) obj_list_close(&delfamily_list, &delfamily_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_encdata.h trousers-0.3.11.2/src/include/obj_encdata.h --- trousers-0.3.11.2.orig/src/include/obj_encdata.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_encdata.h 2014-03-18 17:09:17.995293937 -0400 @@ -52,7 +52,7 @@ TSS_RESULT obj_encdata_get_seal_protect_ #define ENCDATA_LIST_DECLARE struct obj_list encdata_list #define ENCDATA_LIST_DECLARE_EXTERN extern struct obj_list encdata_list -#define ENCDATA_LIST_INIT() list_init(&encdata_list) +#define ENCDATA_LIST_INIT() tspi_list_init(&encdata_list) #define ENCDATA_LIST_CONNECT(a,b) obj_connectContext_list(&encdata_list, a, b) #define ENCDATA_LIST_CLOSE(a) obj_list_close(&encdata_list, &encdata_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_hash.h trousers-0.3.11.2/src/include/obj_hash.h --- trousers-0.3.11.2.orig/src/include/obj_hash.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_hash.h 2014-03-18 17:10:55.521285725 -0400 @@ -34,7 +34,7 @@ TSS_RESULT obj_hash_update_value(TSS_HHA #define HASH_LIST_DECLARE struct obj_list hash_list #define HASH_LIST_DECLARE_EXTERN extern struct obj_list hash_list -#define HASH_LIST_INIT() list_init(&hash_list) +#define HASH_LIST_INIT() tspi_list_init(&hash_list) #define HASH_LIST_CONNECT(a,b) obj_connectContext_list(&hash_list, a, b) #define HASH_LIST_CLOSE(a) obj_list_close(&hash_list, &__tspi_hash_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_migdata.h trousers-0.3.11.2/src/include/obj_migdata.h --- trousers-0.3.11.2.orig/src/include/obj_migdata.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_migdata.h 2014-03-18 17:09:04.032295112 -0400 @@ -118,7 +118,7 @@ TSS_RESULT obj_migdata_calc_sig_data_dig #define MIGDATA_LIST_DECLARE struct obj_list migdata_list #define MIGDATA_LIST_DECLARE_EXTERN extern struct obj_list migdata_list -#define MIGDATA_LIST_INIT() list_init(&migdata_list) +#define MIGDATA_LIST_INIT() tspi_list_init(&migdata_list) #define MIGDATA_LIST_CONNECT(a,b) obj_connectContext_list(&migdata_list, a, b) #define MIGDATA_LIST_CLOSE(a) obj_list_close(&migdata_list, &migdata_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_nv.h trousers-0.3.11.2/src/include/obj_nv.h --- trousers-0.3.11.2.orig/src/include/obj_nv.h 2013-08-16 17:22:49.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_nv.h 2014-03-18 17:07:43.648301881 -0400 @@ -68,7 +68,7 @@ TSS_RESULT obj_nvstore_create_pcrshortin #define NVSTORE_LIST_DECLARE struct obj_list nvstore_list #define NVSTORE_LIST_DECLARE_EXTERN extern struct obj_list nvstore_list -#define NVSTORE_LIST_INIT() list_init(&nvstore_list) +#define NVSTORE_LIST_INIT() tspi_list_init(&nvstore_list) #define NVSTORE_LIST_CONNECT(a,b) obj_connectContext_list(&nvstore_list, a, b) #define NVSTORE_LIST_CLOSE(a) obj_list_close(&nvstore_list, &nvstore_free, a) #else diff -urp trousers-0.3.11.2.orig/src/include/obj_pcrs.h trousers-0.3.11.2/src/include/obj_pcrs.h --- trousers-0.3.11.2.orig/src/include/obj_pcrs.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_pcrs.h 2014-03-18 17:09:48.095291402 -0400 @@ -48,7 +48,7 @@ TSS_RESULT obj_pcrs_set_locality(TSS_HPC #define PCRS_LIST_DECLARE struct obj_list pcrs_list #define PCRS_LIST_DECLARE_EXTERN extern struct obj_list pcrs_list -#define PCRS_LIST_INIT() list_init(&pcrs_list) +#define PCRS_LIST_INIT() tspi_list_init(&pcrs_list) #define PCRS_LIST_CONNECT(a,b) obj_connectContext_list(&pcrs_list, a, b) #define PCRS_LIST_CLOSE(a) obj_list_close(&pcrs_list, &pcrs_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_policy.h trousers-0.3.11.2/src/include/obj_policy.h --- trousers-0.3.11.2.orig/src/include/obj_policy.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_policy.h 2014-03-18 17:11:08.413284639 -0400 @@ -178,7 +178,7 @@ TSS_RESULT obj_policy_get_delegate_publi #define POLICY_LIST_DECLARE struct obj_list policy_list #define POLICY_LIST_DECLARE_EXTERN extern struct obj_list policy_list -#define POLICY_LIST_INIT() list_init(&policy_list) +#define POLICY_LIST_INIT() tspi_list_init(&policy_list) #define POLICY_LIST_CONNECT(a,b) obj_connectContext_list(&policy_list, a, b) #define POLICY_LIST_CLOSE(a) obj_list_close(&policy_list, &__tspi_policy_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_rsakey.h trousers-0.3.11.2/src/include/obj_rsakey.h --- trousers-0.3.11.2.orig/src/include/obj_rsakey.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_rsakey.h 2014-03-18 17:10:21.912288555 -0400 @@ -110,7 +110,7 @@ TSS_RESULT obj_rsakey_set_srk_pubkey(BYT #define RSAKEY_LIST_DECLARE struct obj_list rsakey_list #define RSAKEY_LIST_DECLARE_EXTERN extern struct obj_list rsakey_list -#define RSAKEY_LIST_INIT() list_init(&rsakey_list) +#define RSAKEY_LIST_INIT() tspi_list_init(&rsakey_list) #define RSAKEY_LIST_CONNECT(a,b) obj_connectContext_list(&rsakey_list, a, b) #define RSAKEY_LIST_CLOSE(a) obj_list_close(&rsakey_list, &__tspi_rsakey_free, a) diff -urp trousers-0.3.11.2.orig/src/include/obj_tpm.h trousers-0.3.11.2/src/include/obj_tpm.h --- trousers-0.3.11.2.orig/src/include/obj_tpm.h 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/include/obj_tpm.h 2014-03-18 17:09:33.145292661 -0400 @@ -71,7 +71,7 @@ TSS_RESULT obj_tpm_get_cred(TSS_HTPM, TS #define TPM_LIST_DECLARE struct obj_list tpm_list #define TPM_LIST_DECLARE_EXTERN extern struct obj_list tpm_list -#define TPM_LIST_INIT() list_init(&tpm_list) +#define TPM_LIST_INIT() tspi_list_init(&tpm_list) #define TPM_LIST_CONNECT(a,b) obj_connectContext_list(&tpm_list, a, b) #define TPM_LIST_CLOSE(a) obj_list_close(&tpm_list, &tpm_free, a) diff -urp trousers-0.3.11.2.orig/src/tspi/obj.c trousers-0.3.11.2/src/tspi/obj.c --- trousers-0.3.11.2.orig/src/tspi/obj.c 2013-07-12 12:27:37.000000000 -0400 +++ trousers-0.3.11.2/src/tspi/obj.c 2014-03-18 17:06:24.382308555 -0400 @@ -40,7 +40,7 @@ DELFAMILY_LIST_DECLARE; MIGDATA_LIST_DECLARE; void -list_init(struct obj_list *list) +tspi_list_init(struct obj_list *list) { list->head = NULL; MUTEX_INIT(list->lock); |