<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-04-15)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ccj</strong></font>
 <font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-04-16      Chris Johns <chrisj@rtems.org>

        PR 1774/filesystem
        * libfs/src/imfs/imfs_eval.c: Fix the IMFS eval and eval for make
        handlers to not inspect a mounted file sytems path.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2346.2.85&r2=text&tr2=1.2346.2.86&diff_format=h">M</a></td><td width='1%'>1.2346.2.86</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_eval.c.diff?r1=text&tr1=1.26.2.1&r2=text&tr2=1.26.2.2&diff_format=h">M</a></td><td width='1%'>1.26.2.2</td><td width='100%'>cpukit/libfs/src/imfs/imfs_eval.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.85 rtems/cpukit/ChangeLog:1.2346.2.86
--- rtems/cpukit/ChangeLog:1.2346.2.85  Mon Apr  4 12:08:45 2011
+++ rtems/cpukit/ChangeLog      Fri Apr 15 22:47:31 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-04-16    Chris Johns <chrisj@rtems.org>
+
+       PR 1774/filesystem
+       * libfs/src/imfs/imfs_eval.c: Fix the IMFS eval and eval for make
+       handlers to not inspect a mounted file sytems path.
+<span style="background-color: #FF0000">       </span>
</font> 2011-04-04        Sebastien Bourdeauducq <sebastien.bourdeauducq@gmail.com>
 
        PR 1722/networking

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.26.2.1 rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.26.2.2
--- rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.26.2.1    Fri Aug 27 12:33:11 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_eval.c     Fri Apr 15 22:47:32 2011
</font><font color='#997700'>@@ -306,6 +306,7 @@
</font>    * Get the path length.
    */
   pathlen = strlen( path );
<font color='#000088'>+
</font>   /*
    *  Evaluate all tokens until we are done or an error occurs.
    */
<font color='#997700'>@@ -335,56 +336,58 @@
</font>       case IMFS_UP_DIR:
        /*
         *  Am I at the root of all filesystems? (chroot'ed?)
<font color='#880000'>-   */
</font><font color='#000088'>+        */
</font> 
        if ( pathloc->node_access == rtems_filesystem_root.node_access )
          break;       /* Throw out the .. in this case */
 
 
<font color='#880000'>-   /*
-        * Am I at the root of this mounted filesystem?
-        */
</font><font color='#000088'>+       /*
+        * Am I at the root of this mounted filesystem?
+        */
</font> 
<font color='#880000'>-        if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
</font><font color='#000088'>+        if (pathloc->node_access ==
+            pathloc->mt_entry->mt_fs_root.node_access){
</font> 
           /*
<font color='#880000'>-      *  Am I at the root of all filesystems?
-          */
</font><font color='#000088'>+           *  Am I at the root of all filesystems?
+           */
</font> 
           if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
             break;
<font color='#880000'>-
-         } else {
</font><font color='#000088'>+          } else {
</font>             newloc = pathloc->mt_entry->mt_point_node;
             *pathloc = newloc;
<font color='#880000'>-            return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
-         }
-       } else {
-
</font><font color='#000088'>+            return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name );
+          }
+        } else {
</font>           if ( !node->Parent )
             rtems_set_errno_and_return_minus_one( ENOENT );
 
           node = node->Parent;
<font color='#880000'>-   }
</font><font color='#000088'>+        }
</font> 
         pathloc->node_access = node;
         break;
 
       case IMFS_NAME:
<font color='#000088'>+        /*
+         *  If we are at a link follow it.
+         */
</font> 
<font color='#880000'>-   if ( node->type == IMFS_HARD_LINK ) {
</font><font color='#000088'>+        if ( node->type == IMFS_HARD_LINK ) {
</font> 
           result = IMFS_evaluate_link( pathloc, 0 );
           if ( result == -1 )
             return -1;
 
<font color='#880000'>-   } else if ( node->type == IMFS_SYM_LINK ) {
</font><font color='#000088'>+        } else if ( node->type == IMFS_SYM_LINK ) {
</font> 
           result = IMFS_evaluate_link( pathloc, 0 );
 
           if ( result == -1 )
             return -1;
<font color='#880000'>-   }
</font><font color='#000088'>+        }
</font> 
         node = pathloc->node_access;
         if ( !node )
<font color='#997700'>@@ -392,38 +395,38 @@
</font> 
         /*
          * Only a directory can be decended into.
<font color='#880000'>-    */
</font><font color='#000088'>+         */
</font> 
         if ( node->type != IMFS_DIRECTORY )
           rtems_set_errno_and_return_minus_one( ENOTDIR );
 
<font color='#880000'>-   /*
-        * If we are at a node that is a mount point. Set loc to the
-        * new fs root node and let them finish evaluating the path.
-        */
-
-        if ( node->info.directory.mt_fs != NULL ) {
-          newloc  = node->info.directory.mt_fs->mt_fs_root;
-          *pathloc = newloc;
-          return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
-       }
-
-       /*
-        * Otherwise find the token name in the present location.
-        */
</font><font color='#000088'>+        /*
+         * Otherwise find the token name in the present location.
+         */
</font> 
         node = IMFS_find_match_in_dir( node, token );
 
<font color='#880000'>-   /*
-        * If there is no node we have found the name of the node we
</font><font color='#000088'>+        /*
+         * If there is no node we have found the name of the node we
</font>          * wish to create.
<font color='#880000'>-    */
</font><font color='#000088'>+         */
</font> 
         if ( ! node )
           done = true;
<font color='#880000'>-        else
-          pathloc->node_access = node;
</font><font color='#000088'>+        else {
+          /*
+           * If we are at a node that is a mount point. Set loc to the
+           * new fs root node and let them finish evaluating the path.
+           */
</font> 
<font color='#000088'>+          if ( node->info.directory.mt_fs != NULL ) {
+            newloc  = node->info.directory.mt_fs->mt_fs_root;
+            *pathloc = newloc;
+            return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name );
+          }
+<span style="background-color: #FF0000">          </span>
+          pathloc->node_access = node;
+        }
</font>         break;
 
       case IMFS_NO_MORE_PATH:
<font color='#997700'>@@ -558,18 +561,15 @@
</font>           } else {
             newloc = pathloc->mt_entry->mt_point_node;
             *pathloc = newloc;
<font color='#880000'>-            return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
-                                               pathnamelen+len,
</font><font color='#000088'>+            return (*pathloc->ops->evalpath_h)(&(pathname[i]),
+                                               pathnamelen,
</font>                                                flags,pathloc);
           }
         } else {
<font color='#880000'>-
</font>           if ( !node->Parent )
             rtems_set_errno_and_return_minus_one( ENOENT );
 
           node = node->Parent;
<font color='#880000'>-          pathloc->node_access = node;
-
</font>         }
 
         pathloc->node_access = node;
<font color='#997700'>@@ -605,31 +605,33 @@
</font>           rtems_set_errno_and_return_minus_one( ENOTDIR );
 
         /*
<font color='#880000'>-         *  If we are at a node that is a mount point. Set loc to the
-         *  new fs root node and let them finish evaluating the path.
-         */
-
-        if ( node->info.directory.mt_fs != NULL ) {
-          newloc   = node->info.directory.mt_fs->mt_fs_root;
-          *pathloc = newloc;
-          return (*pathloc->ops->evalpath_h)( &pathname[i-len],
-                                              pathnamelen+len,
-                                              flags, pathloc );
-        }
-
-        /*
</font>          *  Otherwise find the token name in the present location.
          */
 
         node = IMFS_find_match_in_dir( node, token );
<font color='#000088'>+
</font>         if ( !node )
           rtems_set_errno_and_return_minus_one( ENOENT );
 
<font color='#000088'>+
</font>         /*
          *  Set the node access to the point we have found.
          */
 
         pathloc->node_access = node;
<font color='#000088'>+<span style="background-color: #FF0000">        </span>
+        /*
+         *  If we are at a node that is a mount point. Set loc to the
+         *  new fs root node and let them finish evaluating the path.
+         */
+
+        if ( node->info.directory.mt_fs != NULL ) {
+          newloc   = node->info.directory.mt_fs->mt_fs_root;
+          *pathloc = newloc;
+          return (*pathloc->ops->evalpath_h)( &pathname[i],
+                                              pathnamelen,
+                                              flags, pathloc );
+        }
</font>         break;
 
       case IMFS_NO_MORE_PATH:
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>