Email List: Xaustin-review-lX
[All Lists]

aardvark food

To: yyyyyy@xxxxxxxxxxxxxxxxx
Subject: aardvark food
From: yyyyyyyyyyyyyyy@xxxxxx
Date: Wed, 14 Jul 1999 14:52:08 +0200 (MET DST)
Cc: yyyyyyyyyyyyy@xxxxxxxxxxxxx
A month or so ago we had some discussion on rename.
Let me produce an aardvark with a proposal.

(This is for XSH)


@ Page 856 Line 26234 Section rename Objection []

Problem:
1. [Editorial] this sentence is incomplete
2. [Objection] If I read the sentence as "The specification that if old
and new refer to the same file then no action is taken describes existing,
although undocumented 4.3 BSD behaviour", then this sentence is false
for 4.4 BSD, and there is no reason to suppose that it is true for 4.3 BSD.

Action:
Change rationale text to:
The specification that if old and new refer to the same file using
pathnames with the same final element and with path prefixes referring
to the same directory then no action is taken describes existing
4.3 and 4.4 BSD behaviour. It is intended to guarantee that
        rename("x","x");
does not remove the file.


@ Page 854 Line 26148 Section rename Objection []

Problem:
It is not clear what "both refer to and both link to" means, if it is
not equivalent to "both refer to".
This sentence requires unintuitive behaviour, against historical practice,
and causes security problems.
The actual historical practice makes sure that rename("x","x") does not
remove "x", but not that rename("x","x.bak") can succeed in such a way
that afterwards both "x" and "x.bak" exist.

Action:
Change lines 26148-26149 to:
If the old argument and the new argument are pathnames with
the same final element, and these pathnames refer to the same file,
and their path prefixes (the predecessors of the respective
final elements, as defined in 2.3.6) refer to the same directory,
the rename() function shall return successfully and perform no
other action.

<Prev in Thread] Current Thread [Next in Thread>
  • aardvark food, Andries.Brouwer <=