Re: rm(1) bug, possibly serious



Hello!

On Tue, Sep 25, 2007 at 11:54:14PM +0200, Oliver Brandmueller wrote:

In sh:

$ which rm
/bin/rm
$ cd /tmp
$ mkdir -p foo/bar
$ cd foo/bar
$ rm -rf ../
rm: ../: Invalid argument

$ pwd
/tmp
$ ktrace -i /bin/sh
$ which rm
/bin/rm
$ mkdir -p foo/bar
$ cd foo/bar
$ rm -rf ../
rm: ../: Invalid argument
$ rm -rf ../
$ ktrace -C

...
35356 rm NAMI "../"
35356 rm RET rmdir -1 errno 22 Invalid argument
...
35488 rm NAMI "../"
35488 rm RET lstat -1 errno 2 No such file or directory
...

HTH,
Patrick
--
punkt.de GmbH * Vorholzstr. 25 * 76137 Karlsruhe
Tel. 0721 9109 0 * Fax 0721 9109 100
info@xxxxxxxx http://www.punkt.de
Gf: Jürgen Egeling AG Mannheim 108285
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • rm(1) bug, possibly serious
    ... $ mkdir -p foo/var ... $ cd foo/bar ... rm: ../: Invalid argument ...
    (freebsd-stable)
  • Re: rm(1) bug, possibly serious
    ... $ mkdir -p foo/var ... $ cd foo/bar ... rm: ../: Invalid argument ...
    (freebsd-stable)
  • Re: rm(1) bug, possibly serious
    ... rm: ../: Invalid argument ... The first time I got an error message, ... tingo@kg-work$ mkdir -p foo/bar ... tingo@kg-work$ pwd ...
    (freebsd-stable)
  • Re: rm(1) bug, possibly serious
    ... $ mkdir -p foo/var ... $ cd foo/bar ... Looks like you have mistyped 'mkdir' argument:) ... The first time I got an error message, ...
    (freebsd-stable)
  • Re: find exclude question.
    ... $ mkdir -p foo/bar ... You are demonstrating how to exclude all directories in a search path ...
    (comp.unix.shell)