You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2017/04/04 18:54:41 UTC
mina-sshd git commit: [SSHD-733] Do not follow symbolic links when
listing directory entries
Repository: mina-sshd
Updated Branches:
refs/heads/master d3e55205e -> 6be22a8ab
[SSHD-733] Do not follow symbolic links when listing directory entries
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/6be22a8a
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/6be22a8a
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/6be22a8a
Branch: refs/heads/master
Commit: 6be22a8ab36a0da4defe002c99b99d905c18bb84
Parents: d3e5520
Author: Lyor Goldstein <ly...@gmail.com>
Authored: Tue Apr 4 21:54:38 2017 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Tue Apr 4 21:54:38 2017 +0300
----------------------------------------------------------------------
.../apache/sshd/server/subsystem/sftp/SftpSubsystem.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/6be22a8a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java b/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
index f328990..a9da122 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java
@@ -1873,7 +1873,7 @@ public class SftpSubsystem
ServerSession session = getServerSession();
int maxDataSize =
PropertyResolverUtils.getIntProperty(session, MAX_READDIR_DATA_SIZE_PROP, DEFAULT_MAX_READDIR_DATA_SIZE);
- int count = doReadDir(id, handle, dh, reply, maxDataSize, options);
+ int count = doReadDir(id, handle, dh, reply, maxDataSize, IoUtils.getLinkOptions(false));
BufferUtils.updateLengthPlaceholder(reply, lenPos, count);
if ((!dh.isSendDot()) && (!dh.isSendDotDot()) && (!dh.hasNext())) {
dh.markDone();
@@ -2875,10 +2875,10 @@ public class SftpSubsystem
* @see #resolveMissingFileAttributes(Path, int, Map, LinkOption...)
*/
protected Map<String, Object> getAttributes(Path file, int flags, LinkOption... options) throws IOException {
- FileSystem fs = file.getFileSystem();
- Collection<String> supportedViews = fs.supportedFileAttributeViews();
- Map<String, Object> attrs = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
- Collection<String> views;
+ FileSystem fs = file.getFileSystem();
+ Collection<String> supportedViews = fs.supportedFileAttributeViews();
+ Map<String, Object> attrs = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
+ Collection<String> views;
if (GenericUtils.isEmpty(supportedViews)) {
views = Collections.emptyList();