forked from Imagelibrary/rtems
2010-08-27 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1692/filesystem * libcsupport/include/rtems/libio.h, libfs/src/imfs/imfs_eval.c: Fix implementation and use of rtems_libio_is_valid_perms().
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2010-08-27 Joel Sherrill <joel.sherrilL@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1692/filesystem
|
||||||
|
* libcsupport/include/rtems/libio.h, libfs/src/imfs/imfs_eval.c: Fix
|
||||||
|
implementation and use of rtems_libio_is_valid_perms().
|
||||||
|
|
||||||
2010-06-21 Peter Dufault <dufault@hda.com>
|
2010-06-21 Peter Dufault <dufault@hda.com>
|
||||||
|
|
||||||
PR 1570/cpukit
|
PR 1570/cpukit
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ static inline rtems_device_minor_number rtems_filesystem_dev_minor_t(
|
|||||||
* Verifies that the permission flag is valid.
|
* Verifies that the permission flag is valid.
|
||||||
*/
|
*/
|
||||||
#define rtems_libio_is_valid_perms( _perm ) \
|
#define rtems_libio_is_valid_perms( _perm ) \
|
||||||
(~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm ))
|
(((~RTEMS_LIBIO_PERMS_RWX) & _perm ) == 0)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -79,10 +79,8 @@ int IMFS_evaluate_permission(
|
|||||||
IMFS_jnode_t *jnode;
|
IMFS_jnode_t *jnode;
|
||||||
int flags_to_test;
|
int flags_to_test;
|
||||||
|
|
||||||
if ( !rtems_libio_is_valid_perms( flags ) ) {
|
if ( !rtems_libio_is_valid_perms( flags ) )
|
||||||
assert( 0 );
|
rtems_set_errno_and_return_minus_one( EPERM );
|
||||||
rtems_set_errno_and_return_minus_one( EIO );
|
|
||||||
}
|
|
||||||
|
|
||||||
jnode = node->node_access;
|
jnode = node->node_access;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user