Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jdk17u
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
openjdk
jdk17u
Commits
97ed09e0
Commit
97ed09e0
authored
Sep 7, 2016
by
Martin Buchholz
Browse files
Options
Downloads
Patches
Plain Diff
8165643: SecureDirectoryStream doesn't work on linux non-x86
Reviewed-by: alanb
parent
1e5d8827
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c
+5
-4
5 additions, 4 deletions
...rc/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c
jdk/test/java/nio/file/DirectoryStream/SecureDS.java
+3
-0
3 additions, 0 deletions
jdk/test/java/nio/file/DirectoryStream/SecureDS.java
with
8 additions
and
4 deletions
jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c
+
5
−
4
View file @
97ed09e0
...
...
@@ -52,6 +52,10 @@
#include
<strings.h>
#endif
#ifdef __linux__
#include
<sys/syscall.h>
#endif
#if defined(__linux__) || defined(_AIX)
#include
<string.h>
#endif
...
...
@@ -157,14 +161,11 @@ static int fstatat64_wrapper(int dfd, const char *path,
}
#endif
#if defined(__linux__) && defined(_
_x86_64__
)
#if defined(__linux__) && defined(_
LP64) && defined(__NR_newfstatat
)
#define FSTATAT64_SYSCALL_AVAILABLE
static
int
fstatat64_wrapper
(
int
dfd
,
const
char
*
path
,
struct
stat64
*
statbuf
,
int
flag
)
{
#ifndef __NR_newfstatat
#define __NR_newfstatat 262
#endif
return
syscall
(
__NR_newfstatat
,
dfd
,
path
,
statbuf
,
flag
);
}
#endif
...
...
This diff is collapsed.
Click to expand it.
jdk/test/java/nio/file/DirectoryStream/SecureDS.java
+
3
−
0
View file @
97ed09e0
...
...
@@ -45,6 +45,9 @@ public class SecureDS {
DirectoryStream
<
Path
>
stream
=
newDirectoryStream
(
dir
);
stream
.
close
();
if
(!(
stream
instanceof
SecureDirectoryStream
))
{
if
(
System
.
getProperty
(
"os.name"
).
equals
(
"Linux"
))
throw
new
AssertionError
(
"SecureDirectoryStream not supported."
);
System
.
out
.
println
(
"SecureDirectoryStream not supported."
);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment