]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mount.ceph: fix incorrect options parsing
authorXiubo Li <xiubli@redhat.com>
Tue, 11 Feb 2020 07:56:23 +0000 (02:56 -0500)
committerXiubo Li <xiubli@redhat.com>
Tue, 11 Feb 2020 08:07:37 +0000 (03:07 -0500)
commitfffdd52a7b9c6b41c629960bd16d1da5a2be3e26
tree653ea5edf0b409406315737e345dd0a663657c74
parentb5d145fcf9a786fbec1d8b67b3fc8050fc6e3749
mount.ceph: fix incorrect options parsing

The strncmp will only compare the first N bytes, this will be a
problem in some case, for example:

$ mount.ceph :/ /mnt/cephfs -o remount,room_size=10

We assume the "room_size" is a new option, we will never receive
any "room_size=10" data in kernel space, because it will be parsed
as "ro". And another example is if we move the "secret" option up
and before the "secretfile", the "secretfile" will never be correctly
parsed.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mount/mount.ceph.c