udf: Apply uid/gid mount options also to new inodes & chown
authorJan Kara <jack@suse.cz>
Wed, 21 Feb 2018 16:59:31 +0000 (17:59 +0100)
committerJan Kara <jack@suse.cz>
Tue, 27 Feb 2018 09:25:33 +0000 (10:25 +0100)
commitecd10aa42819cd5dcf639d25575e95a5bda8d08a
treefe8b73f2a6cc6d58ba54f04b8204d341a97eb6a1
parent70260e44750356fecb40ff5fcb0f91bcc911ab5f
udf: Apply uid/gid mount options also to new inodes & chown

Currently newly created files belong to current user despite
uid=<number> / gid=<number> mount options. This is confusing to users
(as owner of the file will change after remount / eviction from cache)
and also inconsistent with e.g. FAT with the same mount option. So apply
uid=<number> and gid=<number> also to newly created inodes and similarly
as FAT disallow to change owner of the file in this case.

Reported-by: Steve Kenton <skenton@ou.edu>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/file.c
fs/udf/ialloc.c