You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by gn...@apache.org on 2014/12/01 21:12:13 UTC

mina-sshd git commit: [SSHD-381] Wrong values used for SSH_FXP_OPEN flags

Repository: mina-sshd
Updated Branches:
  refs/heads/master 28900cf51 -> 158785367


[SSHD-381] Wrong values used for SSH_FXP_OPEN flags

Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/15878536
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/15878536
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/15878536

Branch: refs/heads/master
Commit: 15878536767ef0dc96731098f1bec15119d7ca3d
Parents: 28900cf
Author: Guillaume Nodet <gn...@apache.org>
Authored: Mon Dec 1 21:12:02 2014 +0100
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Mon Dec 1 21:12:02 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/sshd/server/sftp/SftpSubsystem.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/15878536/sshd-core/src/main/java/org/apache/sshd/server/sftp/SftpSubsystem.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/sftp/SftpSubsystem.java b/sshd-core/src/main/java/org/apache/sshd/server/sftp/SftpSubsystem.java
index 94de3eb..2b8a915 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/sftp/SftpSubsystem.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/sftp/SftpSubsystem.java
@@ -417,11 +417,11 @@ public class SftpSubsystem implements Command, Runnable, SessionAware, FileSyste
                 try {
                     SshFile file = resolveFile(path);
                     if (file.doesExist()) {
-                        if ((pflags & SSH_FXP_READ) != 0 && !file.isReadable()) {
+                        if ((pflags & SSH_FXF_READ) != 0 && !file.isReadable()) {
                             sendStatus(id, SSH_FX_PERMISSION_DENIED, "Can not read " + path);
                             return;
                         }
-                        if ((pflags & SSH_FXP_WRITE) != 0 && !file.isWritable()) {
+                        if ((pflags & SSH_FXF_WRITE) != 0 && !file.isWritable()) {
                             sendStatus(id, SSH_FX_PERMISSION_DENIED, "Can not write " + path);
                             return;
                         }