public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sandbox:stable-2.x commit in: libsbutil/
@ 2023-07-17 13:57 Mike Gilbert
  0 siblings, 0 replies; only message in thread
From: Mike Gilbert @ 2023-07-17 13:57 UTC (permalink / raw
  To: gentoo-commits

commit:     0cd40599d89e50c23f14970f6e4a31f0500a8b15
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 17 13:43:51 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Jul 17 13:55:25 2023 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=0cd40599

sb_exists: drop use of faccessat

faccessat appears to perform quite poorly under certain conditions.
Go back to using fstatat until this can be debugged.

Bug: https://bugs.gentoo.org/910273
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
(cherry picked from commit 6a6a6a6c9680e5868544887a7ab4d141833abfb6)

 libsbutil/sb_exists.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/libsbutil/sb_exists.c b/libsbutil/sb_exists.c
index 9ec7730..d34f0cc 100644
--- a/libsbutil/sb_exists.c
+++ b/libsbutil/sb_exists.c
@@ -10,15 +10,5 @@
 int sb_exists(int dirfd, const char *pathname, int flags)
 {
 	struct stat64 buf;
-
-	if (faccessat(dirfd, pathname, F_OK, flags) == 0)
-		return 0;
-
-	/* musl's faccessat gives EINVAL when the kernel does not support
-	 * faccessat2 and AT_SYMLINK_NOFOLLOW is set.
-	 * https://www.openwall.com/lists/musl/2023/06/19/1 */
-	if (errno != EINVAL)
-		return -1;
-
 	return fstatat64(dirfd, pathname, &buf, flags);
 }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-17 13:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 13:57 [gentoo-commits] proj/sandbox:stable-2.x commit in: libsbutil/ Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox