Skip to content

Commit 466cb71

Browse files
committed
Include AttachPermission to be able to load as known permissions
Signed-off-by: Gulshan Kumar <[email protected]>
1 parent 9db5e67 commit 466cb71

File tree

1 file changed

+4
-0
lines changed
  • libs/agent-sm/agent-policy/src/main/java/org/opensearch/secure_sm/policy

1 file changed

+4
-0
lines changed

libs/agent-sm/agent-policy/src/main/java/org/opensearch/secure_sm/policy/PolicyFile.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
package org.opensearch.secure_sm.policy;
1010

11+
import com.sun.tools.attach.AttachPermission;
12+
1113
import java.io.File;
1214
import java.io.FileInputStream;
1315
import java.io.FilePermission;
@@ -166,6 +168,8 @@ private static Permission getKnownPermission(Class<?> claz, String name, String
166168
return new AllPermission();
167169
} else if (claz.equals(SecurityPermission.class)) {
168170
return new SecurityPermission(name, actions);
171+
} else if (claz.equals(AttachPermission.class)) {
172+
return new AttachPermission(name, actions);
169173
} else {
170174
return null;
171175
}

0 commit comments

Comments
 (0)