]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "mountpoint-util: tmpfs supports uid=/gid= mount options"
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 7 Nov 2022 14:43:54 +0000 (15:43 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 7 Nov 2022 14:43:54 +0000 (15:43 +0100)
This reverts commit 7d4f00c88c65532bf66d20b3ec498b5bfaa621d2.

fstype_can_uid_gid() is about fixating all files to the specified
uid/gid. tmpfs does not qualify. The uid/gid parameter there is simply
about the default uid/gid for the root inode of the tmpfs, it allows
setting uids/gid arbirarily for all inodes after that.

This distinction matters: for file systems this function returns true
for we can use this in place of uidmapped mounts. But for tmpfs this is
not going to work, given inodes on that fs can end up having arbitrary
uid/gid.

See: https://github.com/systemd/systemd/pull/25284#issue-1438427144

src/basic/mountpoint-util.c

index 8292869e7c9b30816123f1e2cbb9ec121f4ac0e4..dc682688a7c358be4c0c0b3d18c9b6922b722341 100644 (file)
@@ -480,7 +480,6 @@ bool fstype_can_uid_gid(const char *fstype) {
                           "iso9660",
                           "msdos",
                           "ntfs",
-                          "tmpfs",
                           "vfat");
 }