* @throws Exception
*/
public void testSecurityManager()
throws Exception
{
TestSecurityManager tsm = new TestSecurityManager();
/*
The permissions that should be needed
*/
tsm.addPermission(new JndiPermission("path1", "createSubcontext,lookup,list,listBindings,unbind"));
tsm.addPermission(new JndiPermission("path1x", "createSubcontext,unbind"));
tsm.addPermission(new JndiPermission("path1/*", "list,listBindings,lookup"));
tsm.addPermission(new JndiPermission("path1/x", "bind,rebind,unbind"));
tsm.addPermission(new RuntimePermission("setSecurityManager"));
tsm.addPermission(new FilePermission("<<ALL FILES>>", "read"));
tsm.addPermission(new RuntimePermission("createClassLoader"));
tsm.addPermission(new ReflectPermission("suppressAccessChecks"));
tsm.addPermission(new SerializablePermission("enableSubstitution"));
System.setSecurityManager(tsm);
doOps();
doBadOps(true);
}