diff options
author | Simo Sorce <simo@redhat.com> | 2013-04-10 11:34:41 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2013-04-10 11:35:44 -0400 |
commit | 051eb4863cf880f0349a1de44517f9c99a9c5bd4 (patch) | |
tree | c36d6a7a194d4b928fc2f44d28e4ae01054574e6 /utils/gssd/context.h | |
parent | 0ce973a59ab3393481ba7c434a7353b5007cba71 (diff) | |
download | nfs-utils-051eb4863cf880f0349a1de44517f9c99a9c5bd4.tar.gz nfs-utils-051eb4863cf880f0349a1de44517f9c99a9c5bd4.tar.xz nfs-utils-051eb4863cf880f0349a1de44517f9c99a9c5bd4.zip |
gssd: Fix double free when exporting lucid context
When using GSSAPI's gss_krb5_export_lucid_context the context passed
into the function is actually deleted during the export (to avoid
reuse as the context contains state that depends on its usage).
Change the code to pass in a pointer to the context so that it can be
properly NULLed if we are using the GSSAPI context and following calls to
gss_delete_sec_context will not cause double free errors and segfaults.
Signed-off-by: Simo Sorce <simo@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/context.h')
-rw-r--r-- | utils/gssd/context.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/gssd/context.h b/utils/gssd/context.h index 0e437f4..3b55c8e 100644 --- a/utils/gssd/context.h +++ b/utils/gssd/context.h @@ -41,9 +41,9 @@ #define KRB5_CTX_FLAG_CFX 0x00000002 #define KRB5_CTX_FLAG_ACCEPTOR_SUBKEY 0x00000004 -int serialize_context_for_kernel(gss_ctx_id_t ctx, gss_buffer_desc *buf, +int serialize_context_for_kernel(gss_ctx_id_t *ctx, gss_buffer_desc *buf, gss_OID mech, int32_t *endtime); -int serialize_krb5_ctx(gss_ctx_id_t ctx, gss_buffer_desc *buf, +int serialize_krb5_ctx(gss_ctx_id_t *ctx, gss_buffer_desc *buf, int32_t *endtime); #endif /* _CONTEXT_H_ */ |