main: use parsed upper layer directory

Use the directory in the loaded layer structure, and do not use the
value passed on the CLI.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2025-04-28 14:26:26 +02:00
parent 02a3582501
commit b31d82ff8e
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772

2
main.c
View File

@ -5878,7 +5878,7 @@ main (int argc, char *argv[])
if (! found)
{
/* If the mode is missing, set a standard value. */
ret = write_permission_xattr (&lo, get_upper_layer (&lo)->fd, lo.upperdir, 0, 0, 0555);
ret = write_permission_xattr (&lo, get_upper_layer (&lo)->fd, get_upper_layer (&lo)->path, 0, 0, 0555);
if (ret < 0)
error (EXIT_FAILURE, errno, "write xattr `%s` to upperdir", name);
}