final int newMask = ep.action_mask; if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
void addImportedEndpoints(Collection<ImportReference> collection) { SecurityManager securityManager = System.getSecurityManager(); String frameworkUUID = getFrameworkUUID(getBundleContext()); synchronized (m_importedEndpoints) { for (Entry<EndpointDescription, Set<ImportedEndpointImpl>> entry : m_importedEndpoints.entrySet()) { try { if (securityManager != null) { securityManager.checkPermission(new EndpointPermission(entry.getKey(), frameworkUUID, READ)); } collection.addAll(entry.getValue()); } catch (SecurityException e) {} } } }
void addExportedEndpoints(Collection<ExportReference> collection) { SecurityManager securityManager = System.getSecurityManager(); String frameworkUUID = getFrameworkUUID(getBundleContext()); synchronized (m_exportedEndpoints) { for (Entry<EndpointDescription, Set<ExportedEndpointImpl>> entry : m_exportedEndpoints.entrySet()) { try { if (securityManager != null) { securityManager.checkPermission(new EndpointPermission(entry.getKey(), frameworkUUID, READ)); } collection.addAll(entry.getValue()); } catch (SecurityException e) {} } } }
private void emitRemoteServiceAdminEvent(RemoteServiceAdminEvent event, EndpointDescription endpoint) { EndpointPermission permission = new EndpointPermission(endpoint, ServiceUtil.getFrameworkUUID(getBundleContext()), EndpointPermission.READ); for (Entry<ServiceReference<?>, RemoteServiceAdminListener> entry : m_listeners.entrySet()) { if (entry.getKey().getBundle().hasPermission(permission)) { logDebug("Calling RSA listener %s - %s", entry.getKey(), entry.getValue()); entry.getValue().remoteAdminEvent(event); } } }
final int newMask = ep.action_mask; if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
final int newMask = ep.action_mask; if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
final int newMask = ep.action_mask; if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
final int newMask = ep.action_mask; if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
final int newMask = ep.action_mask; if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
if (oldMask != newMask) { pc.put(name, new EndpointPermission(name, oldMask | newMask));
securityManager.checkPermission(new EndpointPermission(endpoint, getFrameworkUUID(getBundleContext()), EXPORT));
securityManager.checkPermission(new EndpointPermission(endpoint, getFrameworkUUID(getBundleContext()), IMPORT));