[NetworkBrowser] Problems with default options

Issue #746 new
prl created an issue

AutoMount.sanitizeOptions() is intended to supply defaults for options if they aren’t supplied by users.

But:

  • It applies different NFS default options depending on whether the “Mount using” setting is autofs, fstab or enigma2, without there being any apparent reason for the differences.
  • It can override (depending on option processing details not present in the man pages) some user-specified options: for example, if the user adds the NFS mount option nfsvers=4, then sanitizeOptions() will make the system file option nfsvers=4,…,nfsvers=3. Similar overrides can happen for the NFS options timeo and hard and the CIFS option cache.
  • It uses loose substring matches in the option string to detect whether particular options are present, rather than parsing the option string to explicitly test against option names and values. For example, it will replace iocharset=utf8 in the user-specified options with iocharset=iocharset=utf8, because it does options = options.replace('utf8','iocharset=utf8')

Replication

For mount types fstab or autofs (sanitised options aren’t written to file for mount type enigma2), add any of the above-mentioned options in a new mount setup and create the mount. Then examine the options in /etc/auto.network (for autofs mounts) or /etc/fstab (for fstab mounts).

Comments (0)

  1. Log in to comment