[Bug 1838] New: fchown doesn't need the file descriptor opened by O_WRONLY or O_RDWR

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Jul 18 06:22:58 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1838

           Summary: fchown doesn't need the file descriptor opened by
                    O_WRONLY or O_RDWR
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: minor
          Priority: P3
         Component: filesystem
        AssignedTo: chrisj at rtems.org
        ReportedBy: medivhc at gmail.com


In testsuites/psxtest/psxfchx01/init.c, line 139: 


  puts( "Init - open new file: /newfile in read-only mode -- OK" );
  fd = open( "/newfile", O_RDONLY | O_CREAT, S_IRWXU );
  rtems_test_assert( fd != -1 );

  puts( "Init - fchmod, with the opened file descriptor - expect EINVAL" );
  status = fchmod( fd, 0 );
  rtems_test_assert( status == -1 );
  rtems_test_assert( errno == EINVAL );


The fchmod returns success in Linux.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list