Commit Graph

2 Commits

Author SHA1 Message Date
Florian Weimer
3844cdc330 io: Fix destructive nature of tst-fchmod-errors
We must not change the permissions of /dev/null if running
as root.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2024-08-30 22:30:05 +02:00
Florian Weimer
424d97be50 io: Add error tests for fchmod
On Linux most descriptors that do not correspond to file system
entities (such as anonymous pipes and sockets) have file permissions
that can be changed.  While it is possible to create a custom file
system that returns (say) EINVAL for an fchmod attempt, testing this
does not appear to be useful.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2024-08-30 21:12:01 +02:00