-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Based on systemd/systemd#12018. Systemd uses libmount to parse /proc/self/mountinfo.
$ mkdir "$(echo -e foo\\rbar)"
$ sudo mount -t tmpfs tmpfs foo^Mbar/
$ findmnt | grep foo
│ └─/tmp/foo tmpfs tmpfs rw,bar,seclabelQuoting systemd/systemd#12018 (comment):
fscanf() will split fields on whitespace, and what counts as whitespace is both locale-specific and different to the actual file format (even in the C locale). The Linux kernel, the GNU C library, and other utilities are quite specific that only SPC and TAB are field separator characters; whereas fscanf() will also incorrectly split fields on VT and CR.
- GNU C library using
__strsep()with TAB and SPC and decoding field contents - netdata specifying only TAB and SPC as the the separators in the call to
procfile_open() - Linux only encoding some whitespace characters in the first place
- source of
fstab-decode
Whether or not CR is a good idea in a mount point name, one should parse the data file correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels