fs: fat: cannot write to subdirectories
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 2 Jul 2018 00:41:23 +0000 (02:41 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 25 Jul 2018 12:59:44 +0000 (14:59 +0200)
commit0dc1bfb7302d220a48364263d5632d6d572b069b
treef300fb9a8dcd6c034735ab1b5e8d6d7768656c2f
parent1fcb7ea28400aa69e157dc4b19c9667e96d3a033
fs: fat: cannot write to subdirectories

fs_fat_write() is not able to write to subdirectories.

Currently if a filepath with a leading slash is passed, the slash is
treated as part of the filename to be created in the root directory.

Strip leading (back-)slashes.

Check that the remaining filename does not contain any illegal characters
(<>:"/\|?*). This way we will throw an error when trying to write to a
subdirectory.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
fs/fat/fat_write.c