PermissionCollection pc = deferredPolicy.getPermissions(s, cs);
if (s == null)
return pc; // No subject means no specific permissions
Set principals = s.getPrincipals();
Iterator i = principals.iterator();
while (i.hasNext()) {
Principal p = (Principal) i.next();
FilePermission fp = new FilePermission(File.separator +
"files" + File.separator +
p.getName() + File.separator + "-",
"read,write,delete");
pc.add(fp);
}
return pc;