OSDN Git Service

quota: Verify flags passed to Q_SETINFO
authorJan Kara <jack@suse.cz>
Wed, 19 Nov 2014 08:32:39 +0000 (09:32 +0100)
committerJan Kara <jack@suse.cz>
Wed, 21 Jan 2015 18:21:31 +0000 (19:21 +0100)
commitca6cb0918e8765de304916a15554b42203e6e1fc
treed6ca130f4089ec58096d5163d62001b305fa86a6
parent9c45101e88b2bf2ce36b8833fcfa784a9149aa74
quota: Verify flags passed to Q_SETINFO

Currently flags passed via Q_SETINFO were just stored. This makes it
hard to add new flags since in theory userspace could be just setting /
clearing random flags. Since currently there is only one userspace
settable flag and that is somewhat obscure flags only for ancient v1
quota format, I'm reasonably sure noone operates these flags and
hopefully we are fine just adding the check that passed flags are sane.
If we indeed find some userspace program that gets broken by the strict
check, we can always remove it again.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/dquot.c