[Bug 2413] New: getmntent() returns invalid, not existent paths in mntent.mnt_dir
bugzilla at busybox.net
bugzilla at busybox.net
Wed Aug 18 13:20:51 UTC 2010
https://bugs.busybox.net/show_bug.cgi?id=2413
Summary: getmntent() returns invalid, not existent paths in
mntent.mnt_dir
Product: uClibc
Version: 0.9.32
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P5
Component: Standard Compliance
AssignedTo: unassigned at uclibc.org
ReportedBy: deweloper at wp.pl
CC: uclibc-cvs at uclibc.org
Estimated Hours: 0.0
getmntent() fills mntent.mnt_dir with a value directly obtained from
/proc/mounts file, without processing octal escapes.
This results in returning non-existent path names for file systems which are
mounted in paths that contain whitespace characters. And, for example, this
causes the `df' applet from busybox to fail for such filesystems.
getmntent(3) linux man page says:
> Since fields in the mtab and fstab files are separated by whitespace, octal
> escapes are used to represent the four characters space (\040), tab (\011),
> newline (\012) and backslash (\134) in those files when they occur in one of
> the four strings in a mntent structure. The routines addmntent() and getmntent()
> will convert from string representation to escaped representation and back.
So applications may just assume that mntent.mnt_dir contains a valid, existing
path to the mount directory which may be used directly.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the uClibc-cvs
mailing list