]> git.michaelhowe.org Git - packages/o/openafs.git/commit
STABLE14-windows-integrated-logon-hack-fix-for-proper-refcounts-20060119
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 19 Jan 2006 23:08:44 +0000 (23:08 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 19 Jan 2006 23:08:44 +0000 (23:08 +0000)
commita1e514c0f74b06aaf700a27526843f2923b968d9
treef629e5332039213f0016a161b6ea1c59858c323f
parent45b7a7dc2b0de3885c510e88b7865aaf691e8b1b
STABLE14-windows-integrated-logon-hack-fix-for-proper-refcounts-20060119

The Integrated Logon hack of setting a token for a smb name different
than the one associated with the current smb session fails when smb
virtual circuits, sessions and username objects are properly reference
counted.  When refcounts are not leaked the constructed smb_username_t
is destroyed immediately after the token is set since there are not
references to it from a current session.

The fix is to mark the smb_username_t object with a flag indicating that
it was created by the Network Provider.  This flag prevents the destruction
when the refcount is zero so that it will be available at the time the
smb session is created (just a moment or two later.)  During the binding
of the smb_username_t to the smb_vc_t the flag is cleared allowing the
tokens to be destroyed when the smb session is closed.

(cherry picked from commit 70b76b3a1cff1dabe9b10b8222cd84fc207b6704)
src/WINNT/afsd/afslogon.c
src/WINNT/afsd/cm_ioctl.c
src/WINNT/afsd/cm_user.c
src/WINNT/afsd/cm_user.h
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb.h
src/WINNT/afsd/smb3.c
src/WINNT/afsd/smb3.h