Changeset de691e6 in rtems for cpukit/libcsupport/src/eval.c


Ignore:
Timestamp:
Nov 25, 2003, 5:26:45 PM (16 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
3959276e
Parents:
ba77fe60
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

    rba77fe60 rde691e6  
    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
     122  return result;
     123}
     124
Note: See TracChangeset for help on using the changeset viewer.