eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
358 stars 105 forks source link

MountInfo does not unescape special characters #262

Open tatref opened 1 year ago

tatref commented 1 year ago

See unmangle_octalfunction in PR #261

To test:

mkdir "$(echo -e 'aaa\\b\tc\nd#e')"
dd if=/dev/zero bs=1M count=200 of=ext4.img
mkfs.ext4 ext4.img
sudo mount  ext4.img aaa*

Then run example mountinfo, this will give:

/dev/loop0 on /root/test/aaa\134b\011c\012d#e type ext4 (relatime,rw,seclabel)