From 79b809ae68afbf6fdb69f10fe16c6f94bb87a318 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 9 Jan 2024 16:45:10 -0500 Subject: [PATCH] glnx-xattrs: Fix invalid argument to lsetxattr() We weren't passing the right path argument here. This bug would've been quickly noticed if the function were actually used but I still did at least a global GitHub search which didn't return any users. --- glnx-xattrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glnx-xattrs.c b/glnx-xattrs.c index d0e6ab3d..84fd6094 100644 --- a/glnx-xattrs.c +++ b/glnx-xattrs.c @@ -437,7 +437,7 @@ glnx_lsetxattrat (int dfd, char pathbuf[PATH_MAX]; snprintf (pathbuf, sizeof (pathbuf), "/proc/self/fd/%d/%s", dfd, subpath); - if (TEMP_FAILURE_RETRY (lsetxattr (subpath, attribute, value, len, flags)) < 0) + if (TEMP_FAILURE_RETRY (lsetxattr (pathbuf, attribute, value, len, flags)) < 0) return glnx_throw_errno_prefix (error, "lsetxattr(%s)", attribute); return TRUE;