We can have 5 elements in one MDS Cap -
1. fs name (string)
2. fs path (string)
3. root_squash (bool)
4. uid (int)
5. gids (list of ints)
Total 31 types of MDS caps are possible (5c5 + 5c4 + 5c3 + 5c2 + 5c1 = 31). Out of these, 11 MDS caps succeeded in parsing and 20 MDS caps failed to parsing.
Parsing failed for following MDS caps -
allow rw gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'gids=1000,1001,1002' of 'allow rw gids=1000,1001,1002'
allow rw fsname=a uid=1000 Error EINVAL: mds capability parse failed, stopped at 'uid=1000' of 'allow rw fsname=a uid=1000'
allow rw fsname=a gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'gids=1000,1001,1002' of 'allow rw fsname=a gids=1000,1001,1002'
allow rw path=/dir1 gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'gids=1000,1001,1002' of 'allow rw path=/dir1 gids=1000,1001,1002'
allow rw root_squash uid=1000 Error EINVAL: mds capability parse failed, stopped at 'uid=1000' of 'allow rw root_squash uid=1000'
allow rw root_squash gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'gids=1000,1001,1002' of 'allow rw root_squash gids=1000,1001,1002'
allow rw fsname=a path=/dir1 uid=1000 Error EINVAL: mds capability parse failed, stopped at 'uid=1000' of 'allow rw fsname=a path=/dir1 uid=1000'
allow rw fsname=a path=/dir1 gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'gids=1000,1001,1002' of 'allow rw fsname=a path=/dir1 gids=1000,1001,1002'
allow rw fsname=a root_squash uid=1000 Error EINVAL: mds capability parse failed, stopped at 'uid=1000' of 'allow rw fsname=a root_squash uid=1000'
allow rw fsname=a root_squash gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'gids=1000,1001,1002' of 'allow rw fsname=a root_squash gids=1000,1001,1002'
allow rw fsname=a uid=1000 gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'uid=1000 gids=1000,1001,1002' of 'allow rw fsname=a uid=1000 gids=1000,1001,1002'
allow rw path=/dir1 root_squash uid=1000 Error EINVAL: mds capability parse failed, stopped at 'uid=1000' of 'allow rw path=/dir1 root_squash uid=1000'
allow rw path=/dir1 root_squash gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'gids=1000,1001,1002' of 'allow rw path=/dir1 root_squash gids=1000,1001,1002'
allow rw root_squash uid=1000 gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'uid=1000 gids=1000,1001,1002' of 'allow rw root_squash uid=1000 gids=1000,1001,1002'
allow rw fsname=a path=/dir1 root_squash uid=1000 Error EINVAL: mds capability parse failed, stopped at 'uid=1000' of 'allow rw fsname=a path=/dir1 root_squash uid=1000'
allow rw fsname=a path=/dir1 root_squash gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'gids=1000,1001,1002' of 'allow rw fsname=a path=/dir1 root_squash gids=1000,1001,1002'
allow rw fsname=a path=/dir1 uid=1000 gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'uid=1000 gids=1000,1001,1002' of 'allow rw fsname=a path=/dir1 uid=1000 gids=1000,1001,1002'
allow rw fsname=a root_squash uid=1000 gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'uid=1000 gids=1000,1001,1002' of 'allow rw fsname=a root_squash uid=1000 gids=1000,1001,1002'
allow rw path=/dir1 root_squash uid=1000 gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'uid=1000 gids=1000,1001,1002' of 'allow rw path=/dir1 root_squash uid=1000 gids=1000,1001,1002'
allow rw fsname=a path=/dir1 root_squash uid=1000 gids=1000,1001,1002 Error EINVAL: mds capability parse failed, stopped at 'uid=1000 gids=1000,1001,1002' of 'allow rw fsname=a path=/dir1 root_squash uid=1000 gids=1000,1001,1002'
And following MDS caps were parsed successfully -
allow rw fsname=a
allow rw path=/dir1
allow rw root_squash
allow rw uid=1000
allow rw fsname=a path=/dir1
allow rw fsname=a root_squash
allow rw path=/dir1 root_squash
allow rw path=/dir1 uid=1000
allow rw uid=1000 gids=1000,1001,1002
allow rw fsname=a path=/dir1 root_squash
allow rw path=/dir1 uid=1000 gids=1000,1001,1002