[Bug 1536] New: TFTP file system does not handle relative paths

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri May 28 23:45:16 CDT 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1536

           Summary: TFTP file system does not handle relative paths
           Product: RTEMS
           Version: 4.10
          Platform: All
        OS/Version: RTEMS
            Status: ASSIGNED
          Severity: normal
          Priority: P3
         Component: filesystem
        AssignedTo: chrisj at rtems.org
        ReportedBy: chrisj at rtems.org


The TFTP file system does not handle relative paths. Mount the TFTP file system
then read a file without a '/' at the start from the root directory. For
example:

 $ mount -t tftpfs null /c

mounts the TFTP file system to /c (the default in the code currently is /TFTP)
then:

 $ cat c/readme

The evaluate only handles a chdir to the /c directory where the path is saved
as a string. This is fine. When the open is called it passes in 'c/readme' and
the node_access field of the pathloc is not set (not a directory). We have to
assume the pathloc's node_access field is not initialised. It may be set else
where in the code or cleared how-ever open assumes it is a pointer to a string
that it appends 'c/readme' to.

The fix is to save the file name as is and to use that in open. If you look in
the other file system they all access the file via some internal reference
provided by evaluate. For example in the RFS it is the inode number of the
file.

The path passed to open is not used and thinking about this it cannot be used
in its current form in any useful way. I think the open file handler interface
is open broken passing pathname.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the rtems-bugs mailing list