6837842: JNI_CreateJavaVM crashes under impersonation

Fri, 19 Nov 2010 03:41:50 -0800

author
poonam
date
Fri, 19 Nov 2010 03:41:50 -0800
changeset 2310
0b33f0736406
parent 2309
22260322f0be
child 2311
a6b067997c7e

6837842: JNI_CreateJavaVM crashes under impersonation
Reviewed-by: acorn, dholmes

src/os/windows/vm/perfMemory_windows.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/os/windows/vm/perfMemory_windows.cpp	Thu Nov 18 14:37:46 2010 -0500
     1.2 +++ b/src/os/windows/vm/perfMemory_windows.cpp	Fri Nov 19 03:41:50 2010 -0800
     1.3 @@ -889,6 +889,7 @@
     1.4    DWORD newACLsize = aclinfo.AclBytesInUse +
     1.5                          (sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD)) * ace_count;
     1.6    for (int i = 0; i < ace_count; i++) {
     1.7 +     assert(aces[i].pSid != 0, "pSid should not be 0");
     1.8       newACLsize += GetLengthSid(aces[i].pSid);
     1.9    }
    1.10  
    1.11 @@ -1084,6 +1085,9 @@
    1.12    aces[0].pSid = get_user_sid(GetCurrentProcess());
    1.13    aces[0].mask = umask;
    1.14  
    1.15 +  if (aces[0].pSid == 0)
    1.16 +    return NULL;
    1.17 +
    1.18    // get the well known SID for BUILTIN\Administrators
    1.19    PSID administratorsSid = NULL;
    1.20    SID_IDENTIFIER_AUTHORITY SIDAuthAdministrators = SECURITY_NT_AUTHORITY;

mercurial