summaryrefslogtreecommitdiff
path: root/java/openjdk6/files/icedtea/security/20130416/8001329.patch
blob: 592c665a3be54d9cd51d80472b56eca810ca6aa4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# HG changeset patch
# User dmocek
# Date 1360111105 28800
# Node ID a0e51ed355c9ae1256f8d344df34babb87a1edce
# Parent  4a3260353853c3590ceb915337e21fe17aa07dbd
8001329: Augment RMI logging
Reviewed-by: smarks, hawtin, alanb

diff --git a/src/share/classes/java/rmi/server/LogStream.java b/src/share/classes/java/rmi/server/LogStream.java
--- jdk/src/share/classes/java/rmi/server/LogStream.java
+++ jdk/src/share/classes/java/rmi/server/LogStream.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2004, 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 @@
      */
     @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;
     }