|
From: | Pádraig Brady |
Subject: | Re: coreutils-9.0.193-54bec on Solaris 11.4 |
Date: | Tue, 12 Apr 2022 15:05:41 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0 |
On 11/04/2022 14:55, Pádraig Brady wrote:
On 11/04/2022 02:44, Bruno Haible wrote:Pádraig Brady wrote:FAIL: tests/install/basic-1 =========================== FAIL: tests/mv/diag ===================These two are the same issue I think ... diff --git a/src/system.h b/src/system.h index c24cb4dc3..d2c473a59 100644 --- a/src/system.h +++ b/src/system.h @@ -140,9 +140,12 @@ target_directory_operand (char const *file) bool is_a_dir = false; struct stat st; - /* On old systems like Solaris 10, check with stat first - lest we try to open a fifo for example and hang. */ - if (!O_DIRECTORY && stat (file, &st) == 0) + /* On old systems without O_DIRECTORY, like Solaris 10, + check with stat first lest we try to open a fifo for example and hang. + Also check on systems with O_PATHSEARCH == O_SEARCH, like Solaris 11, + where open was seen to return EPERM for non directories. */ + if (!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH) + && stat (file, &st) == 0)Isn't there a parenthesizing mistake here? I would write if ((!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH)) && stat (file, &st) == 0) This patch does not apply cleanly to the snapshot source. I tried a similar patch, but it did not help.Yes sorry, I had the correct parentheses in the attached patch. Thanks for confirming the equivalent didn't address this issue. I'll need to dig into this more.
I was able to get access to a Solaris 11.3 system, where I confirmed that open(O_SEARCH|O_DIRECTORY) returns EACCES for non executable files. This does seem like a bug in that O_DIRECTORY should take precedence, especially considering O_SEARCH is documented in the Solaris open man page to return ENOTDIR for non directories. The attached addresses these two test failures in my testing. thanks, Pádraig
solaris-11-eacces.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |