X-mount.idmap accepts a series of whitespace-separated tokens. We reject
an empty argument but silently accept an argument consisting of whitespace
with no tokens. Test for the empty case more thoroughly.
[kzak@redhat.com: - use skip_blank()]
Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
opt = mnt_optlist_get_named(ol, "X-mount.idmap", cxt->map_userspace);
if (!opt)
return 0;
- value = mnt_opt_get_value(opt);
- if (!value)
+ value = mnt_opt_get_value(opt);
+ if (value)
+ value = skip_blank(p);
+ if (!value || !*value)
return errno = EINVAL, -MNT_ERR_MOUNTOPT;
hd = new_hook_data();