Skip to content

mkfifo: -m -1 is rejected by the argument parser #16000

Closed

Description

@sylvestre
$ mkfifo -m -1 f; echo $?

GNU accepts it, creates f with mode 0666 and exits 0.
uutils:

error: unexpected argument '-1' found
  tip: to pass '-1' as a value, use '-- -1'

chmod -1 file works in uutils, so the mode parser already handles it. Only the clap definition of -m needs to accept hyphen values.

Reported in #15254 (found by a differential fuzzer; reproduced against GNU coreutils 9.12).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions