* src/lib/gssapi/mechglue/mglueP.h: Add loopback field to opaque
authorTom Yu <tlyu@mit.edu>
Mon, 7 Aug 2006 23:33:39 +0000 (23:33 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 7 Aug 2006 23:33:39 +0000 (23:33 +0000)
commit90ce1170a03c1451c1bbe15af6ca1ead326eeb83
tree0e79247689024932a6eb34f04f69010da582572d
parent75d6683d1528102b8764e9ccbcd5dc34f5ac1a2c
* src/lib/gssapi/mechglue/mglueP.h: Add loopback field to opaque
structs of gss_ctx_id_t, gss_name_t, gss_cred_id_t to catch some
application programming errors.  Add new macro GSSINT_CHK_LOOP()
which returns non-zero if loopback field doesn't point to itself.

* src/lib/gssapi/mechglue/g_accept_sec_context.c
(gss_accept_sec_context):
* src/lib/gssapi/mechglue/g_acquire_cred.c (gss_add_cred)
(gss_acquire_cred):
* src/lib/gssapi/mechglue/g_delete_sec_context.c
(gss_delete_sec_context):
* src/lib/gssapi/mechglue/g_glue.c
(gssint_convert_name_to_union_name):
* src/lib/gssapi/mechglue/g_imp_name.c (gss_import_name):
* src/lib/gssapi/mechglue/g_imp_sec_context.c
(gss_import_sec_context):
* src/lib/gssapi/mechglue/g_init_sec_context.c
(gss_init_sec_context): Set loopback pointers.

* src/lib/gssapi/mechglue/g_delete_sec_context.c
(gss_delete_sec_context):
* src/lib/gssapi/mechglue/g_rel_cred.c (gss_release_cred):
* src/lib/gssapi/mechglue/g_rel_name.c (gss_release_name): Call
GSSINT_CHK_LOOP() to validate loopback pointer.

ticket: 4063
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18417 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/gssapi/mechglue/g_accept_sec_context.c
src/lib/gssapi/mechglue/g_acquire_cred.c
src/lib/gssapi/mechglue/g_delete_sec_context.c
src/lib/gssapi/mechglue/g_dup_name.c
src/lib/gssapi/mechglue/g_glue.c
src/lib/gssapi/mechglue/g_imp_name.c
src/lib/gssapi/mechglue/g_imp_sec_context.c
src/lib/gssapi/mechglue/g_init_sec_context.c
src/lib/gssapi/mechglue/g_rel_cred.c
src/lib/gssapi/mechglue/g_rel_name.c
src/lib/gssapi/mechglue/mglueP.h