Topic: Syntax "error" in SftpServer/FileSystemAcl.c

Please apply this patch to CVS:

diff --git a/SftpServer/FileSystemAcl.c b/SftpServer/FileSystemAcl.c
index 8c74fde..90d571e 100644
--- a/SftpServer/FileSystemAcl.c
+++ b/SftpServer/FileSystemAcl.c
@@ -150,7 +150,7 @@ int FSEnumAcl(const char *file, int resolvePath, void (*callback)(void *data, in
                {
                        int mode;
 
-                       mode = (acls[i].a_perm & 2) ? SSH5_ACE4_READ_DATA : 0) |
+                       mode = ((acls[i].a_perm & 2) ? SSH5_ACE4_READ_DATA : 0) |
                         ((acls[i].a_perm & 4) ? SSH5_ACE4_WRITE_DATA : 0) |
                         ((acls[i].a_perm & 1) ? SSH5_ACE4_EXECUTE : 0);
                        switch (acls[i].a_type)

I am actually surprised, that the current code compiles. I have tried adding more (unbalanced) braces and it still compiles. Holy cow :-)

Re: Syntax "error" in SftpServer/FileSystemAcl.c

Wow !!!! Good point for you smile

The code is only for CYGWIN so we can't see the errors smile

Re: Syntax "error" in SftpServer/FileSystemAcl.c

It seems CVS still has the old version:
http://mysecureshell.cvs.sourceforge.ne … c?view=log

Please apply the patch :-)

Re: Syntax "error" in SftpServer/FileSystemAcl.c

CVS is sync only after each release smile