Code review request for 7049079: NTSYSTEM CLASS IS LEAKING 3 WINDOWS TOKENS

Seán Coffey sean.coffey at
Fri Sep 2 08:15:07 PDT 2011

This is a forward port to JDK 8 of a fix gone into jdk 5 and jdk6 releases.
It'll be ported to 7u shortly after jdk8.

Bug id is not public.

NTSystem() obtains a native Token instance for each constructor call.
This is unnecessary and Token instances should only be requested when
called for, i.e. at getImpersonationToken() time.

No auto testcase but fix has been verified though use of the MS handle
tool and a simple java testcase.


More information about the security-dev mailing list