99
1010package org .elasticsearch .entitlement .bridge ;
1111
12+ import java .io .File ;
1213import java .io .InputStream ;
1314import java .io .PrintStream ;
1415import java .io .PrintWriter ;
4748import java .nio .channels .DatagramChannel ;
4849import java .nio .channels .ServerSocketChannel ;
4950import java .nio .channels .SocketChannel ;
51+ import java .nio .charset .Charset ;
5052import java .nio .file .Path ;
53+ import java .nio .file .attribute .UserPrincipal ;
5154import java .security .cert .CertStoreParameters ;
5255import java .util .List ;
5356import java .util .Locale ;
6366@ SuppressWarnings ("unused" ) // Called from instrumentation code inserted by the Entitlements agent
6467public interface EntitlementChecker {
6568
66- ////////////////////
69+ /// /////////////////
6770 //
6871 // Exit the JVM process
6972 //
@@ -74,7 +77,7 @@ public interface EntitlementChecker {
7477
7578 void check$java_lang_System$$exit (Class <?> callerClass , int status );
7679
77- ////////////////////
80+ /// /////////////////
7881 //
7982 // ClassLoader ctor
8083 //
@@ -85,7 +88,7 @@ public interface EntitlementChecker {
8588
8689 void check$java_lang_ClassLoader$ (Class <?> callerClass , String name , ClassLoader parent );
8790
88- ////////////////////
91+ /// /////////////////
8992 //
9093 // SecureClassLoader ctor
9194 //
@@ -96,7 +99,7 @@ public interface EntitlementChecker {
9699
97100 void check$java_security_SecureClassLoader$ (Class <?> callerClass , String name , ClassLoader parent );
98101
99- ////////////////////
102+ /// /////////////////
100103 //
101104 // URLClassLoader constructors
102105 //
@@ -111,7 +114,7 @@ public interface EntitlementChecker {
111114
112115 void check$java_net_URLClassLoader$ (Class <?> callerClass , String name , URL [] urls , ClassLoader parent , URLStreamHandlerFactory factory );
113116
114- ////////////////////
117+ /// /////////////////
115118 //
116119 // "setFactory" methods
117120 //
@@ -124,7 +127,7 @@ public interface EntitlementChecker {
124127
125128 void check$javax_net_ssl_SSLContext$$setDefault (Class <?> callerClass , SSLContext context );
126129
127- ////////////////////
130+ /// /////////////////
128131 //
129132 // Process creation
130133 //
@@ -133,7 +136,7 @@ public interface EntitlementChecker {
133136
134137 void check$java_lang_ProcessBuilder$$startPipeline (Class <?> callerClass , List <ProcessBuilder > builders );
135138
136- ////////////////////
139+ /// /////////////////
137140 //
138141 // System Properties and similar
139142 //
@@ -142,7 +145,7 @@ public interface EntitlementChecker {
142145
143146 void check$java_lang_System$$clearProperty (Class <?> callerClass , String key );
144147
145- ////////////////////
148+ /// /////////////////
146149 //
147150 // JVM-wide state changes
148151 //
@@ -219,7 +222,7 @@ public interface EntitlementChecker {
219222
220223 void check$java_net_URLConnection$$setContentHandlerFactory (Class <?> callerClass , ContentHandlerFactory fac );
221224
222- ////////////////////
225+ /// /////////////////
223226 //
224227 // Network access
225228 //
@@ -416,7 +419,7 @@ public interface EntitlementChecker {
416419
417420 void check$sun_nio_ch_DatagramChannelImpl$receive (Class <?> callerClass , DatagramChannel that , ByteBuffer dst );
418421
419- ////////////////////
422+ /// /////////////////
420423 //
421424 // Load native libraries
422425 //
@@ -484,4 +487,27 @@ public interface EntitlementChecker {
484487 void check$java_lang_foreign_SymbolLookup$$libraryLookup (Class <?> callerClass , Path path , Arena arena );
485488
486489 void check$java_lang_ModuleLayer$Controller$enableNativeAccess (Class <?> callerClass , ModuleLayer .Controller that , Module target );
490+
491+ /// /////////////////
492+ //
493+ // File access
494+ //
495+
496+ void check$java_util_Scanner$ (Class <?> callerClass , File source );
497+
498+ void check$java_util_Scanner$ (Class <?> callerClass , File source , String charsetName );
499+
500+ void check$java_util_Scanner$ (Class <?> callerClass , File source , Charset charset );
501+
502+ void check$java_io_FileOutputStream$ (Class <?> callerClass , String name );
503+
504+ void check$java_io_FileOutputStream$ (Class <?> callerClass , String name , boolean append );
505+
506+ void check$java_io_FileOutputStream$ (Class <?> callerClass , File file );
507+
508+ void check$java_io_FileOutputStream$ (Class <?> callerClass , File file , boolean append );
509+
510+ void check$java_nio_file_Files$$probeContentType (Class <?> callerClass , Path path );
511+
512+ void check$java_nio_file_Files$$setOwner (Class <?> callerClass , Path path , UserPrincipal principal );
487513}
0 commit comments