提交 c574449f 编写于 作者: M mullan

8216381: More limited privilege usage

Reviewed-by: ahgross, coffeys, rhalade
上级 341cd762
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -425,7 +425,8 @@ public final class AccessController { ...@@ -425,7 +425,8 @@ public final class AccessController {
throw new NullPointerException("null permissions parameter"); throw new NullPointerException("null permissions parameter");
} }
Class <?> caller = Reflection.getCallerClass(); Class <?> caller = Reflection.getCallerClass();
return AccessController.doPrivileged(action, createWrapper(null, DomainCombiner dc = (context == null) ? null : context.getCombiner();
return AccessController.doPrivileged(action, createWrapper(dc,
caller, parent, context, perms)); caller, parent, context, perms));
} }
...@@ -710,7 +711,8 @@ public final class AccessController { ...@@ -710,7 +711,8 @@ public final class AccessController {
throw new NullPointerException("null permissions parameter"); throw new NullPointerException("null permissions parameter");
} }
Class <?> caller = Reflection.getCallerClass(); Class <?> caller = Reflection.getCallerClass();
return AccessController.doPrivileged(action, createWrapper(null, caller, parent, context, perms)); DomainCombiner dc = (context == null) ? null : context.getCombiner();
return AccessController.doPrivileged(action, createWrapper(dc, caller, parent, context, perms));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册