7059259: (process) ProcessBuilder.start permission check should be improved when redirecting output to append
Reviewed-by: hawtin
This commit is contained in:
parent
a2a420e7de
commit
c3c22d1d74
@ -60,10 +60,11 @@ final class ProcessImpl extends Process {
|
||||
throws IOException
|
||||
{
|
||||
if (append) {
|
||||
String path = f.getPath();
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
if (sm != null)
|
||||
sm.checkWrite(f.getPath());
|
||||
long handle = openForAtomicAppend(f.getPath());
|
||||
sm.checkWrite(path);
|
||||
long handle = openForAtomicAppend(path);
|
||||
final FileDescriptor fd = new FileDescriptor();
|
||||
fdAccess.setHandle(fd, handle);
|
||||
return AccessController.doPrivileged(
|
||||
|
Loading…
Reference in New Issue
Block a user