diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2012-12-18 00:25:48 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2012-12-18 00:25:48 +0000 |
commit | a41d1bc642641e36d620138f93f484921d361bce (patch) | |
tree | 1a528b7e5e6224c7d6841c880e1617f1b61ec29e /sys/kgssapi/gssapi_impl.h | |
parent | 17649eee7d94c9b2e7885ee9119c83cef611a8e4 (diff) | |
download | FreeBSD-src-a41d1bc642641e36d620138f93f484921d361bce.zip FreeBSD-src-a41d1bc642641e36d620138f93f484921d361bce.tar.gz |
Piete.Brooks at cl.cam.ac.uk reported via email a crash which was
caused by use of an invalid kgss_gssd_handle during an upcall to
the gssd daemon when it has exited. This patch seems to avoid the
crashes by holding a reference count on the kgss_gssd_handle until
the upcall is done. It also adds a new mutex kgss_gssd_lock used to
make manipulation of kgss_gssd_handle SMP safe.
Tested by: Illias A. Marinos, Herbert Poeckl
Reviewed by: jhb
MFC after: 2 weeks
Diffstat (limited to 'sys/kgssapi/gssapi_impl.h')
-rw-r--r-- | sys/kgssapi/gssapi_impl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kgssapi/gssapi_impl.h b/sys/kgssapi/gssapi_impl.h index 629b80b..c143255 100644 --- a/sys/kgssapi/gssapi_impl.h +++ b/sys/kgssapi/gssapi_impl.h @@ -53,8 +53,10 @@ struct kgss_mech { LIST_HEAD(kgss_mech_list, kgss_mech); extern CLIENT *kgss_gssd_handle; +extern struct mtx kgss_gssd_lock; extern struct kgss_mech_list kgss_mechs; +CLIENT *kgss_gssd_client(void); int kgss_oid_equal(const gss_OID oid1, const gss_OID oid2); extern void kgss_install_mech(gss_OID mech_type, const char *name, struct kobj_class *cls); |