2010-08-27 Joel Sherrill <joel.sherrilL@OARcorp.com>

PR 1692/filesystem
	* libcsupport/include/rtems/libio.h, libfs/src/devfs/devfs_eval.c,
	libfs/src/imfs/imfs_eval.c: Fix implementation and use of
	rtems_libio_is_valid_perms().
This commit is contained in:
Joel Sherrill
2010-08-27 17:32:59 +00:00
parent 225216358a
commit 9063a0e3c9
4 changed files with 12 additions and 8 deletions
+7
View File
@@ -1,3 +1,10 @@
2010-08-27 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1692/filesystem
* libcsupport/include/rtems/libio.h, libfs/src/devfs/devfs_eval.c,
libfs/src/imfs/imfs_eval.c: Fix implementation and use of
rtems_libio_is_valid_perms().
2010-08-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libfs/src/defaults/default_evalpath.c,
+1 -1
View File
@@ -1287,7 +1287,7 @@ static inline rtems_device_minor_number rtems_filesystem_dev_minor_t(
* Verifies that the permission flag is valid.
*/
#define rtems_libio_is_valid_perms( _perm ) \
(~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm ))
(((~RTEMS_LIBIO_PERMS_RWX) & _perm ) == 0)
/*
* Prototypes for filesystem
+2 -4
View File
@@ -40,10 +40,8 @@ int devFS_evaluate_path(
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
+2 -3
View File
@@ -80,9 +80,8 @@ int IMFS_evaluate_permission(
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
}
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;