diff --git a/src/share/classes/java/rmi/server/LogStream.java b/src/share/classes/java/rmi/server/LogStream.java index 625e841ce8f2ea0328c3a49b6ee426abe0bc3078..60adea3d965c6dd8d93cda33aa1baf5b9d44948e 100644 --- a/src/share/classes/java/rmi/server/LogStream.java +++ b/src/share/classes/java/rmi/server/LogStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -120,6 +120,13 @@ public class LogStream extends PrintStream { */ @Deprecated public static synchronized void setDefaultStream(PrintStream newDefault) { + SecurityManager sm = System.getSecurityManager(); + + if (sm != null) { + sm.checkPermission( + new java.util.logging.LoggingPermission("control", null)); + } + defaultStream = newDefault; }