logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1612730 - /logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/util/Activator.java
Date Tue, 22 Jul 2014 23:55:34 GMT
Author: mattsicker
Date: Tue Jul 22 23:55:33 2014
New Revision: 1612730

URL: http://svn.apache.org/r1612730
Log:
Add security check for accessing BundleWiring class through adapt().

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/util/Activator.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/util/Activator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/util/Activator.java?rev=1612730&r1=1612729&r2=1612730&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/util/Activator.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/util/Activator.java
Tue Jul 22 23:55:33 2014
@@ -21,6 +21,7 @@ import java.security.Permission;
 
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.status.StatusLogger;
+import org.osgi.framework.AdaptPermission;
 import org.osgi.framework.AdminPermission;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
@@ -56,6 +57,7 @@ public class Activator implements Bundle
             final URL url = bundle.getEntry(ProviderUtil.PROVIDER_RESOURCE);
             if (url != null) {
                 checkPermission(new AdminPermission(bundle, AdminPermission.CLASS));
+                checkPermission(new AdaptPermission(BundleWiring.class.getName(), bundle,
AdaptPermission.ADAPT));
                 ProviderUtil.loadProvider(url, getBundleClassLoader(bundle));
             }
         } catch (final Exception e) {



Mime
View raw message