udf: Provide saner default for invalid uid / gid
authorJan Kara <jack@suse.cz>
Thu, 22 Feb 2018 09:39:52 +0000 (10:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:38 +0000 (07:52 +0200)
commit504583768092571e828549063d427dc5fcc2e952
treeadee22bd0114fb953c4e008459c6d63eca7e2232
parentcb808972d770288c9072a9144d032ae7d3585720
udf: Provide saner default for invalid uid / gid

[ Upstream commit 116e5258e4115aca0c64ac0bf40ded3b353ed626 ]

Currently when UDF filesystem is recorded without uid / gid (ids are set
to -1), we will assign INVALID_[UG]ID to vfs inode unless user uses uid=
and gid= mount options. In such case filesystem could not be modified in
any way as VFS refuses to modify files with invalid ids (even by root).
This is confusing to users and not very useful default since such media
mode is generally used for removable media. Use overflow[ug]id instead
so that at least root can modify the filesystem.

Reported-by: Steve Kenton <skenton@ou.edu>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/udf/super.c