bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: currently doable? Indirect notation used w/a hash


From: Linda Walsh
Subject: Re: currently doable? Indirect notation used w/a hash
Date: Mon, 10 Jun 2013 15:00:27 -0700
User-agent: Thunderbird


  Point taken, but the only way such a string would be passed as a
  variable name is if it was given as user input -- which would,
  presumably, be sanitized before being used. Programming it literally
  makes as much sense as 'rm -rf /'.
---
        That still didn't POSIX-Gnu rm from disabling that ability.

        Though the one that really causes a pain is them removing
the ability to safely delete all files in a directory with the 'rm' command.

        Now, many contortions are necessary.

        (i.e.:   "cd testing/output/ && rm --one-file-system  -fr ."
used to safely deleted everything in output -- except the "." --
but it was 'last' (recursive 'rm' has to be depth first), and
the -f would suppress the error you got about not being able to remove ".".

Now they put in a special check to check the starting arguments first,
before doing the depth-first remove and abort any processing for files
in "."   You need  to use 'find' with alot more typing to do something similar.

All done in the name of the new posix spec.   I was told that the reason
why posix has changed from descriptive to prescriptive is because there are
no more companies representing the SYSV flavors of the utils -- so the BSD
reps decided to use POSIX to force all the flavors to become like BSD by
changing POSIX to describe BSD and forcing others to comply or be branded
not-posix compliant.

Of course it's a little more complicated than that description, but that seems
to a large part of what is going on.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]