Seth Forshee 42d0c4bdf7
filelocks: use mount idmapping for setlease permission check
A user should be allowed to take out a lease via an idmapped mount if
the fsuid matches the mapped uid of the inode. generic_setlease() is
checking the unmapped inode uid, causing these operations to be denied.

Fix this by comparing against the mapped inode uid instead of the
unmapped uid.

Fixes: 9caccd41541a ("fs: introduce MOUNT_ATTR_IDMAP")
Cc: stable@vger.kernel.org
Signed-off-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2023-03-09 22:36:12 +01:00
..
2023-02-20 14:10:36 -08:00
2023-03-01 18:18:25 -06:00
2023-02-21 11:07:23 -08:00
2023-02-20 12:33:41 -08:00
2023-02-27 10:04:49 -08:00
2023-02-24 12:58:55 -08:00
2023-03-01 08:42:27 -08:00
2023-02-20 14:10:36 -08:00
2023-02-27 16:18:51 -08:00
2023-02-27 09:53:58 -08:00
2023-02-24 12:58:55 -08:00
2023-03-01 08:47:19 -08:00
2023-02-24 12:58:55 -08:00
2023-02-23 14:16:56 -08:00
2023-03-01 18:18:25 -06:00
2023-02-22 14:21:40 -08:00
2023-02-21 10:45:51 -08:00
2023-02-20 11:53:11 -08:00
2022-12-23 11:55:54 -08:00
2023-02-21 10:45:51 -08:00
2023-02-28 16:08:30 -08:00
2023-02-22 14:11:54 -08:00
2023-02-20 11:53:11 -08:00
2023-01-31 15:01:20 +01:00
2022-10-10 19:45:17 -07:00
2023-02-20 11:53:11 -08:00
2023-02-20 11:53:11 -08:00
2023-02-20 14:10:36 -08:00
2022-10-10 14:21:11 -07:00
2023-02-20 11:53:11 -08:00
2023-02-20 14:10:36 -08:00
2023-01-19 09:24:30 +01:00
2023-02-22 14:21:40 -08:00
2023-01-11 15:47:40 -05:00
2022-12-21 14:45:25 +01:00
2023-02-20 12:14:33 -08:00
2023-02-20 11:53:11 -08:00
2023-02-20 14:10:36 -08:00
2023-02-20 11:53:11 -08:00
2023-02-20 11:53:11 -08:00