]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_protofile: fix permission octet when suid/guid is set
authorLuca Di Maio <luca.dimaio1@gmail.com>
Wed, 16 Apr 2025 21:20:04 +0000 (23:20 +0200)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 28 May 2025 10:12:16 +0000 (12:12 +0200)
commit6b66b1ab513f90ed7ddd59b167788e1567146dfa
treebb4933c24c2d7d3d6e371ed18e03c11a15ccb197
parent72d5abe1d8c3cf184a1c53cea267c57e7957e6f9
xfs_protofile: fix permission octet when suid/guid is set

When encountering suid or sgid files, we already set the `u` or `g`
property in the prototype file.
Given that proto.c only supports three numbers for permissions, we
need to remove the redundant information from the permission, else
it was incorrectly parsed.

Co-authored-by: Luca Di Maio <luca.dimaio1@gmail.com>
Co-authored-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
[aalbersh: 68 chars limit and removed patch review revisions]
mkfs/xfs_protofile.py.in