Changeset 86042ae in rtems for cpukit/libcsupport/src/eval.c


Ignore:
Timestamp:
Nov 25, 2003, 5:27:55 PM (17 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Children:
c11ca814
Parents:
7fa97181
Message:

2003-11-25 Jennifer Averett <jennifer@…>

PR 519/filesystem

  • include/rtems/libio_.h, src/eval.c, src/rmdir.c, src/unlink.c: Check write permissions in parent directory for file or directory delete
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/eval.c

    r7fa97181 r86042ae  
    9898}
    9999
     100
     101int rtems_filesystem_evaluate_parent(
     102  int                                flags,
     103  rtems_filesystem_location_info_t  *pathloc
     104)
     105{
     106  rtems_filesystem_location_info_t  parent;
     107  int                               result;
     108 
     109  if ( !pathloc )
     110    rtems_set_errno_and_return_minus_one( EIO );       /* should never happen */
     111 
     112  if ( !pathloc->ops->evalpath_h )
     113    rtems_set_errno_and_return_minus_one( ENOTSUP );
     114
     115  parent = *pathloc;
     116  result = (*pathloc->ops->evalpath_h)( "..", flags, &parent );
     117  if (result != 0){
     118    return -1;
     119  }
     120  rtems_filesystem_freenode( &parent );
     121  return result;
     122}
     123
Note: See TracChangeset for help on using the changeset viewer.