---------- Forwarded message ---------- From: Jason Tang <ares.t...@gmail.com> Date: 2011/11/29 Subject: ConfigurationAdminImpl check permission by ConfigurationPermission To: dev-...@felix.apache.org
Hi I just read the code of configurationAdminImpl, since configuration should be written and read by same bundle, I just wonder how to handle this rule. And I found it will use ConfigurationPermission to manager the rule, and in configurationAdminImpl, it will using following way to check permission: > > void checkPermission( String name ) > { > // the caller's permission must be checked > final SecurityManager sm = System.getSecurityManager(); > if ( sm != null ) > { > // CM 1.4 / 104.11.1 Implicit permission > if ( name != null && !name.equals( getBundle().getLocation() ) > ) > { > try > { > sm.checkPermission( new ConfigurationPermission( name, > ConfigurationPermission.CONFIGURE ) ); I wonder which SecurityManager it used for permission check? And how it record which bundle own the config? BRs //Tang Weiqiang