#1838 closed defect (fixed)

fchown doesn't need the file descriptor opened by O_WRONLY or O_RDWR

Reported by: Xiang Cui Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: fs Version: 4.11
Severity: minor Keywords:
Cc: joel.sherrill@… Blocked By:
Blocking:

Description

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.

Attachments (2)

pr1838.diff (5.0 KB) - added by Joel Sherrill on Jul 18, 2011 at 6:21:55 PM.
Patch v1
pr1838_410.diff (566 bytes) - added by Joel Sherrill on Jul 19, 2011 at 12:15:46 PM.
patch for 4.10 and older

Download all attachments as: .zip

Change History (4)

Changed on Jul 18, 2011 at 6:21:55 PM by Joel Sherrill

Attachment: pr1838.diff added

Patch v1

Changed on Jul 19, 2011 at 12:15:46 PM by Joel Sherrill

Attachment: pr1838_410.diff added

patch for 4.10 and older

comment:1 Changed on Jul 19, 2011 at 12:18:56 PM by Joel Sherrill

Resolution: fixed
Status: newclosed, joel.sherrill@oarcorp.com

committed to all applicable branches.

comment:2 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.