File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
unix/classes/jdk/internal/agent
windows/classes/jdk/internal/agent Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2004, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2004, 2023 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2929import java .io .IOException ;
3030
3131/*
32- * Solaris/ Linux implementation of jdk.internal.agent.FileSystem
32+ * Linux implementation of jdk.internal.agent.FileSystem
3333 */
3434@ SuppressWarnings ("removal" )
3535public class FileSystemImpl extends FileSystem {
@@ -39,6 +39,10 @@ public boolean supportsFileSecurity(File f) throws IOException {
3939 }
4040
4141 public boolean isAccessUserOnly (File f ) throws IOException {
42+ String path = f .getPath ();
43+ if (path .indexOf (0 ) >= 0 ) {
44+ throw new IOException ("illegal filename" );
45+ }
4246 return isAccessUserOnly0 (f .getPath ());
4347 }
4448
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2004, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2004, 2023 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3535public class FileSystemImpl extends FileSystem {
3636
3737 public boolean supportsFileSecurity (File f ) throws IOException {
38+ String path = f .getAbsolutePath ();
39+ if (path .indexOf (0 ) >= 0 ) {
40+ throw new IOException ("illegal filename" );
41+ }
3842 return isSecuritySupported0 (f .getAbsolutePath ());
3943 }
4044
4145 public boolean isAccessUserOnly (File f ) throws IOException {
4246 String path = f .getAbsolutePath ();
47+ if (path .indexOf (0 ) >= 0 ) {
48+ throw new IOException ("illegal filename" );
49+ }
4350 if (!isSecuritySupported0 (path )) {
4451 throw new UnsupportedOperationException ("File system does not support file security" );
4552 }
You can’t perform that action at this time.
0 commit comments