commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33972] New: - FTP Parsing off in Net Components for ACL
Date Fri, 11 Mar 2005 22:37:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33972>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33972

           Summary: FTP Parsing off in Net Components for ACL
           Product: Commons
           Version: Nightly Builds
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Net
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: robertalasch@yahoo.com


If a directory has a access control list tied to it, when a directory listing is
spit out, a plus is appended onto the end of the permissions.  This causes
parsing of the file fails.  Below are two patches that solves this.  The first
is for the test file under
/net/trunk/src/test/org/apache/commons/net/ftp/parser/.  The second is the
actual parser that is under /net/trunk/src/java/org/apache/commons/net/ftp/parser.


Index: UnixFTPEntryParserTest.java
===================================================================
--- UnixFTPEntryParserTest.java	(revision 155093)
+++ UnixFTPEntryParserTest.java	(working copy)
@@ -24,7 +24,7 @@
 
 /**
  * @author <a href="mailto:scohen@apache.org">Steve Cohen</a>
- * @version $Id: UnixFTPEntryParserTest.java,v 1.15 2004/09/14 01:47:17 scohen
Exp $
+ * @version $Id$
  */
 public class UnixFTPEntryParserTest extends FTPParseTestFramework
 {
@@ -45,6 +45,7 @@
 
     private static final String[] goodsamples =
     {
+
         "-rw-r--r--   1 500      500            21 Aug  8 14:14 JB3-TES1.gz",
         "-rwxr-xr-x   2 root     root         4096 Mar  2 15:13 zxbox",
         "drwxr-xr-x   2 root     root         4096 Aug 24  2001 zxjdbc",
@@ -70,6 +71,8 @@
         "-rwSr-Sr--   1 500      500             0 Mar 25 08:22 testSuid",
 		"-rwsr-sr--   1 500      500             0 Mar 25 08:23 testSuidExec",
 		"-rwsr-sr--   1 500      500             0 Mar 25 0:23 testSuidExec2",
+        "drwxrwx---+ 23 500     500    0 Jan 10 13:09 testACL",
+
 		"-rw-r--r--   1 1        3518644 May 25 12:12 std"
     };


Index: UnixFTPEntryParser.java
===================================================================
--- UnixFTPEntryParser.java	(revision 155093)
+++ UnixFTPEntryParser.java	(working copy)
@@ -26,7 +26,7 @@
  * This class is based on the logic of Daniel Savarese's
  * DefaultFTPListParser, but adapted to use regular expressions and to fit the
  * new FTPFileEntryParser interface.
- * @version $Id: UnixFTPEntryParser.java,v 1.21 2005/01/02 03:17:50 scohen Exp $
+ * @version $Id$
  * @see org.apache.commons.net.ftp.FTPFileEntryParser FTPFileEntryParser (for
usage instructions)
  */
 public class UnixFTPEntryParser extends ConfigurableFTPFileEntryParserImpl
@@ -65,7 +65,7 @@
      */
     private static final String REGEX =
         "([bcdlfmpSs-])"
-        +
"(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\s+"
+        +
"(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\+?\\s+"
         + "(\\d+)\\s+"
         + "(\\S+)\\s+"
         + "(?:(\\S+)\\s+)?"

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message