# HG changeset patch # User pchelko # Date 1390392939 -14400 # Node ID ab6e7bb8ff9fa5f4289931aad4f0e6ef0793badd # Parent 91bce40d03471a69098b7727a6493890d96f79f4 7155984: Security problems in regression test java/awt/PrintJob/Security/SecurityDialogTest.java Reviewed-by: anthony, serb diff -r 91bce40d0347 -r ab6e7bb8ff9f src/macosx/classes/apple/laf/JRSUIUtils.java --- a/src/macosx/classes/apple/laf/JRSUIUtils.java Thu Jan 23 20:36:31 2014 +0400 +++ b/src/macosx/classes/apple/laf/JRSUIUtils.java Wed Jan 22 16:15:39 2014 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,9 @@ import com.apple.laf.AquaImageFactory.NineSliceMetrics; import apple.laf.JRSUIConstants.*; +import sun.security.action.GetPropertyAction; + +import java.security.AccessController; public class JRSUIUtils { static boolean isLeopard = isMacOSXLeopard(); @@ -47,7 +50,7 @@ static boolean currentMacOSXVersionMatchesGivenVersionRange(final int version, final boolean inclusive, final boolean matchBelow, final boolean matchAbove) { // split the "10.x.y" version number - String osVersion = System.getProperty("os.version"); + String osVersion = AccessController.doPrivileged(new GetPropertyAction("os.version")); String[] fragments = osVersion.split("\\."); // sanity check the "10." part of the version