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.
This commit is contained in:
Jonathan Lebon
2024-01-09 16:45:10 -05:00
parent c1e954e82a
commit 79b809ae68

View File

@@ -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;