I was about to suggest the following, on GNU/Linux:

  # Don't do this unless you know what you're doing!
  rm -fr /proc/self/cwd/

Except it doesn't work!  Not even if I append '.':

  $ mkdir /tmp/victim
  $ cd /tmp/victim
  $ touch foo
  $ rm -fr /proc/self/cwd/
  rm: cannot remove `/proc/self/cwd': Too many levels of symbolic links
  $ rm -fr /proc/self/cwd/.
  rm: cannot remove directory: `/proc/self/cwd/.'
  $ ls
  foo

Aren't these bugs, at least?



Reply via email to