-
Notifications
You must be signed in to change notification settings - Fork 146
Conversation
b1c22f1
to
c1a1116
Compare
c1a1116
to
69e5009
Compare
After adding the missing |
Ooops, thanks for catching that! |
69e5009
to
afaa6ae
Compare
root string | ||
mountPoint string | ||
mountOptions string | ||
optionalFields string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to proc(5)
:
(7) optional fields: zero or more fields of the form "tag[:value]".
Does the Scanf
work if there are several fields? It would be good to add some unit tests about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably fine because we only care about (5) and (6) but for that same reason we can only parse the first 6 fields (which are fixed) and avoid possible problems. I'll update the PR with that and some unit tests. Thanks!
Except the issue with parsing |
This includes: - A proper check for Linux. The previous one was just checking if the devices were the same, this is not true for bind-mounts within the same device - A check for FreeBSD courtesy of Maciej Pasternacki <[email protected]>. Jails seem to have f_fsid set to zero so the original check didn't work. Now we check f_fstypename, f_mntfromname and f_mntonname too. - As a fallback (for other systems) we do the same as the original code: just check the f_fsid.
afaa6ae
to
8962271
Compare
Updated with only parsing the first 6 fields and added a test |
👍 thanks |
ace/validator: fix mountpoint checks
This includes:
devices were the same, this is not true for bind-mounts within the
same device
[email protected]. Jails seem to have f_fsid set to zero so the
original check didn't work. Now we check r_fstypename, f_mntfromname
and f_mntonname too.
just check the f_fsid.
Fixes #464
cc @mpasternacki