<!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-03-03)</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-03-03 Chris Johns <chrisj@rtems.org>
* libcsupport/src/mknod.c, libfs/src/rfs/rtems-rfs-inode.c: PR
1749. Fix the incorrect handling of the file type in the mode
value to reject invalid types as per the standard.
</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.2758&r2=text&tr2=1.2759&diff_format=h">M</a></td><td width='1%'>1.2759</td><td width='100%'>cpukit/ChangeLog</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.78&r2=text&tr2=1.2346.2.79&diff_format=h">M</a></td><td width='1%'>1.2346.2.79</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mknod.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>cpukit/libcsupport/src/mknod.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mknod.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.14.2.1&diff_format=h">M</a></td><td width='1%'>1.14.2.1</td><td width='100%'>cpukit/libcsupport/src/mknod.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-inode.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c.diff?r1=text&tr1=1.3.2.2&r2=text&tr2=1.3.2.3&diff_format=h">M</a></td><td width='1%'>1.3.2.3</td><td width='100%'>cpukit/libfs/src/rfs/rtems-rfs-inode.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2758 rtems/cpukit/ChangeLog:1.2759
--- rtems/cpukit/ChangeLog:1.2758 Wed Mar 2 08:39:45 2011
+++ rtems/cpukit/ChangeLog Thu Mar 3 00:22:47 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-03-03 Chris Johns <chrisj@rtems.org>
+
+ * libcsupport/src/mknod.c, libfs/src/rfs/rtems-rfs-inode.c: PR
+ 1749. Fix the incorrect handling of the file type in the mode
+ value to reject invalid types as per the standard.
+<span style="background-color: #FF0000"> </span>
</font> 2011-03-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/netinet/if_ether.c,<span style="background-color: #FF0000"> </span>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.78 rtems/cpukit/ChangeLog:1.2346.2.79
--- rtems/cpukit/ChangeLog:1.2346.2.78 Mon Feb 7 16:34:09 2011
+++ rtems/cpukit/ChangeLog Thu Mar 3 00:33:14 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-03-03 Chris Johns <chrisj@rtems.org>
+
+ * libcsupport/src/mknod.c, libfs/src/rfs/rtems-rfs-inode.c: PR
+ 1749. Fix the incorrect handling of the file type in the mode
+ value to reject invalid types as per the standard.
+
</font> 2011-02-08 Brett Swimley <bswimley@advanced.pro>
* libfs/src/rfs/rtems-rfs-rtems.c: Fix bug where the eval path did
<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mknod.c:1.15 rtems/cpukit/libcsupport/src/mknod.c:1.16
--- rtems/cpukit/libcsupport/src/mknod.c:1.15 Thu Jul 1 10:12:37 2010
+++ rtems/cpukit/libcsupport/src/mknod.c Thu Mar 3 00:22:48 2011
</font><font color='#997700'>@@ -40,9 +40,21 @@
</font> const char *name_start;
int result;
<font color='#880000'>- if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
- rtems_set_errno_and_return_minus_one( EINVAL );
-
</font><font color='#000088'>+ /*
+ * The file type is field within the mode. Check we have a sane mode set.
+ */
+ switch (mode & S_IFMT)
+ {
+ case S_IFDIR:
+ case S_IFCHR:
+ case S_IFBLK:
+ case S_IFREG:
+ case S_IFIFO:
+ break;
+ default:
+ rtems_set_errno_and_return_minus_one( EINVAL );
+ }
+<span style="background-color: #FF0000"> </span>
</font> rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
result = (*temp_loc.ops->evalformake_h)(
<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/mknod.c:1.14 rtems/cpukit/libcsupport/src/mknod.c:1.14.2.1
--- rtems/cpukit/libcsupport/src/mknod.c:1.14 Tue Oct 14 10:06:25 2008
+++ rtems/cpukit/libcsupport/src/mknod.c Thu Mar 3 00:33:15 2011
</font><font color='#997700'>@@ -40,9 +40,21 @@
</font> const char *name_start;
int result;
<font color='#880000'>- if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
- rtems_set_errno_and_return_minus_one( EINVAL );
-
</font><font color='#000088'>+ /*
+ * The file type is field within the mode. Check we have a sane mode set.
+ */
+ switch (mode & S_IFMT)
+ {
+ case S_IFDIR:
+ case S_IFCHR:
+ case S_IFBLK:
+ case S_IFREG:
+ case S_IFIFO:
+ break;
+ default:
+ rtems_set_errno_and_return_minus_one( EINVAL );
+ }
+<span style="background-color: #FF0000"> </span>
</font> rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
if ( !temp_loc.ops->evalformake_h ) {
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.5 rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.6
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.5 Sun Oct 10 23:34:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c Thu Mar 3 00:22:48 2011
</font><font color='#997700'>@@ -211,6 +211,21 @@
</font> printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
}
<font color='#000088'>+ /*
+ * The file type is field within the mode. Check we have a sane mode set.
+ */
+ switch (mode & RTEMS_RFS_S_IFMT)
+ {
+ case RTEMS_RFS_S_IFDIR:
+ case RTEMS_RFS_S_IFCHR:
+ case RTEMS_RFS_S_IFBLK:
+ case RTEMS_RFS_S_IFREG:
+ case RTEMS_RFS_S_IFLNK:
+ break;
+ default:
+ return EINVAL;
+ }
+<span style="background-color: #FF0000"> </span>
</font> rc = rtems_rfs_inode_alloc (fs, parent, ino);
if (rc > 0)
return rc;
<font color='#006600'>diff -u rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.3.2.2 rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.3.2.3
--- rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c:1.3.2.2 Mon Oct 11 16:12:48 2010
+++ rtems/cpukit/libfs/src/rfs/rtems-rfs-inode.c Thu Mar 3 00:33:16 2011
</font><font color='#997700'>@@ -211,6 +211,21 @@
</font> printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
}
<font color='#000088'>+ /*
+ * The file type is field within the mode. Check we have a sane mode set.
+ */
+ switch (mode & RTEMS_RFS_S_IFMT)
+ {
+ case RTEMS_RFS_S_IFDIR:
+ case RTEMS_RFS_S_IFCHR:
+ case RTEMS_RFS_S_IFBLK:
+ case RTEMS_RFS_S_IFREG:
+ case RTEMS_RFS_S_IFLNK:
+ break;
+ default:
+ return EINVAL;
+ }
+<span style="background-color: #FF0000"> </span>
</font> rc = rtems_rfs_inode_alloc (fs, parent, ino);
if (rc > 0)
return rc;
</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>