Project

General

Profile

Actions

Bug #3791

closed

/bin/sh's builtin 'rm' busted: 'rm -f' without arguments returns error

Added by Stefano Lattarini about 8 years ago. Updated 6 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
cmd - userland programs
Start date:
2013-05-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

  • How to reproduce:

    Check that rm is actually a built-in:

    $ /bin/sh 'type rm'
    rm is a shell builtin version of /usr/xpg4/bin/rm

    Look it misbehave:

    $ /bin/sh 'rm -f'; echo st = $?
    Usage: rm [-cFdfirRuv] file ...
    st = 2
  • Good news:

    The issue is not shared by the 'rm' executables on the system:

    $ /bin/rm -f; echo st = $?
    st = 0
    $ /usr/xpg4/bin/rm -f; echo st = $?
    st = 0
  • Version details:

    $ cat /etc/release
    OpenIndiana Development oi_151.1.7 X86 (powered by illumos)
    Copyright 2011 Oracle and/or its affiliates. All rights reserved.
    Use is subject to license terms.
    Assembled 03 October 2012

  • Why high priority:

    It's worth noting that future version of Automake will start assuming
    that "rm -f" with further arguments works OK; so, packages
    bootstrapped with those future Automakes will not be able to build
    properly when the Illumos shell is in use, unless this bug is fixed.

Actions #1

Updated by Stefano Lattarini about 8 years ago

Actions #2

Updated by Irek Szczesniak about 8 years ago

The issue was fixed by AT&T in ast-ksh.20120214, together with a series of related fixes to pass the latest VSC test suite for SUS conformance.

Actions #3

Updated by Stefano Lattarini about 8 years ago

Thanks, and sorry for the noise.

Stefano

Actions #4

Updated by Andy Fiddaman 6 months ago

  • Status changed from New to Pending RTI
  • Assignee set to Andy Fiddaman
Actions #5

Updated by Andy Fiddaman 6 months ago

  • Subject changed from /bin/sh's builtin 'rm' busted: 'rm -f' without arguments return error to /bin/sh's builtin 'rm' busted: 'rm -f' without arguments returns error
Actions #6

Updated by Electric Monk 6 months ago

  • Gerrit CR set to 1175
Actions #7

Updated by Electric Monk 6 months ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f

commit  b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2021-01-30T17:13:33.000Z

    13405 ksh93 update to 2012-08-01
    13434 sh: mishandles backslash as last character of a block of input
    11750 ksh mkdir builtin doesn't honor special file permissions
    9199 ksh93 builtin *grep -v mishandles blank lines, blows up libgcrypt-config
    6756 sh (and ksh) have issues with ${1+"$@"}
    6520 ksh: sleep could wait forever
    4860 ksh93: core in printf
    3791 /bin/sh's builtin 'rm' busted: 'rm -f' without arguments returns error
    1047 ksh overwrites child core files
    880 ksh93 coredumps on 'unset'
    499 "interrupted system call" when using "tee" builtin in ksh
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Reviewed by: Dominik Hassler <hadfl@omnios.org>
    Approved by: Rich Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF