Subject: bug#77640: [platform-testers] new snapshot available: gzip-1.13.56-e549

From: Paul Eggert <[email-masked]>
Date: Fri, 11 Apr 2025 00:45:15 -0700

On 2025-04-10 15:13, Nelson H. F. Beebe wrote:
> I made this change against the original test file:
> 
> 	%  diff dfly-openat-bug.c dfly-openat-bug-3.c
> 	8c8
> 	<   int dirfd = open ("d/", O_SEARCH | O_DIRECTORY);
> 	---
> 	>   int dirfd = open ("d/", O_RDONLY | O_DIRECTORY);
> 	11c11
> 	<   int fd = openat (dirfd, "f", O_EXCL | O_CREAT | O_WRONLY, 0660);
> 	---
> 

That diff is chopped off; what did line 11 get changed to?

> Here is the test run:
> 
> 	% ls -ldR d
> 	dr-xr-xr-x 1 beebe wheel 0 Apr 10 16:06 d
> 
> 	% gcc dfly-openat-bug-3.c && ./a.out
> 	d/f: Permission denied
> 
> The final message now appears to be accurate, and expected due to the
> directory permissions.

Yes, evidently we didn't fully reproduce the symptoms you reported, 
symptoms that I quoted in <https://bugs.gnu.org/77640#17>. The relevant 
line there is:

>> 	openat(0x4,0x49f822,0xa01,0x180)		 ERR#17 'File exists'

0x180 == 0660 and I assume 0xa01 equals (O_EXCL | O_CREAT | O_WRONLY). 
If so, I don't understand why our attempt to reproduce the bug failed, 
unless it has something to do with a change to line 11 above.

> I'm still unclear about why gzip would need (or want) to be able to
> write into a no-write-access directory in the failing test.
> Explanation?

The test is making sure that gzip outputs a reasonable diagnosic when 
asked to write into an unwriteable directory. Unfortunately this isn't 
happening on DragonflyBSD, evidently due to a kernel bug there.