[OpenAFS-devel] Re: [PATCH] afs, bash: Fix open(O_CREAT) on an extant AFS file in a sticky dir

Chet Ramey chet.ramey@case.edu
Wed, 30 Apr 2025 11:09:44 -0400


On 4/29/25 1:35 PM, Jeffrey E Altman wrote:

> I think its worth clarifying the purpose of this fallback logic and why it 
> exists.  The fallback
> logic was added to bash 1.14.7 as part of the introduction of support for 
> IBM/Transarc AFS 3.4.

The chronology is wrong. The workaround came in in January, 1992, when
bash-1.11 was current and IBM released AFS 3.1. (The bug was actually
encountered with bash-1.08.)

The old code, without the workaround, caused widespread mail delivery
failures at CMU, who reported the problem to me and (they claimed at the
time) IBM, and provided the patch.


> It was noted that sometimes EEXIST would be returned from open(filename, 
> flags | O_CREAT)
> but would succeed if open(filename, flags & ~O_CREAT) was called.  There is 
> no evidence that
> the AFS developers were aware of the problem.

Well, except for CMU's report.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/