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: [EMAIL PROTECTED]


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:[EMAIL PROTECTED]">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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to