Opened 2 years ago

Closed 2 years ago

#13573 closed bug (fixed)

The command ":> /" does not fail regardless of the shell

Reported by: schily Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/Kernel Version: R1/Development
Keywords: rootfs Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This seems to be a kernel bug.

Expected is that trying to open a directory for writing always fails.

Change History (4)

comment:1 by axeld, 2 years ago

rootfs just seems to be very nice to everyone (http://cgit.haiku-os.org/haiku/tree/src/system/kernel/fs/rootfs.cpp#n586).

Is this actually a problem for anything, or just something you accidentally stumbled upon?

comment:2 by axeld, 2 years ago

Component: - GeneralSystem/Kernel
Keywords: rootfs added

comment:3 by schily, 2 years ago

It prevents the Bourne Shell to pass it's compliance test.

POSIX requires builtin commands to fail in case of a failing I/O redirection without exiting the shell.

Since POSIX does not permit directories to be opened for writing, >/ is used to run the test.

comment:4 by axeld, 2 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev51294, thanks for the report!

Note: See TracTickets for help on using tickets.