RFR: 8164071: Default.policy file missing content for solaris
Erik Joelsson
erik.joelsson at oracle.com
Wed Aug 17 16:48:52 UTC 2016
On 2016-08-17 18:43, Sean Mullan wrote:
>
> On 8/17/2016 12:33 PM, Erik Joelsson wrote:
>> Hello Sean,
>>
>> The change looks ok, but it could also be expressed like this to
>> avoid duplication:
>>
>> ifneq ($(filter $(OPENJDK_TARGET_OS), windows solaris), )
>> DEF_POLICY_SRC_LIST +=
>> $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
>> endif
> Thanks. However, shouldn't that be "ifeq" and not "ifneq"?
>
Actually no, if OPENJDK_TARGET_OS is either windows or solaris, the
filter function will return exactly that, otherwise it will return
empty. The if(n)eq compares the result of filter to the empty string.
This construct is a bit convoluted but is our standard construct for
this situation.
/Erik
> --Sean
>>
>>
>> /Erik
>>
>> On 2016-08-17 18:18, Sean Mullan wrote:
>>> Please review this simple fix to append the solaris default.policy
>>> file to the overall default.policy file.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8164071
>>>
>>> diff -r 551f7617b2c0 make/copy/Copy-java.base.gmk
>>> --- a/make/copy/Copy-java.base.gmk Wed Aug 17 10:08:18 2016 +0800
>>> +++ b/make/copy/Copy-java.base.gmk Wed Aug 17 12:17:19 2016 -0400
>>> @@ -185,6 +185,8 @@
>>>
>>> ifeq ($(OPENJDK_TARGET_OS), windows)
>>> DEF_POLICY_SRC_LIST +=
>>> $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
>>> +else ifeq ($(OPENJDK_TARGET_OS), solaris)
>>> + DEF_POLICY_SRC_LIST +=
>>> $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy
>>>
>>> endif
>>>
>>> # Allow imported modules to modify the java.policy
>>>
>>>
>>> Thanks,
>>> Sean
>>
>
More information about the security-dev
mailing list