VisionSystemsInc / VisionSystemsInc/vsi_common

mount_point doesn't work as expected with special characters

Open
#388 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug linux
Dominant language
Shell
Stars
8
Forks
9
Avg merge
36m
Merged PRs (30d)
1

Description

In linux, it's totally possible to have a mount point with tabs and newlines in it, although highly unlikely.

While the df and mount command do work with these as inputs, the output has them replaced with ? instead, making the commands mount_point and mount_type not work as expected.

The only solution, as I see it, is to parse /proc/mounts and use that output instead, which is in octal (at least on fedora 33)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the mount_point and mount_type commands and compare their current use of df or mount with the octal-escaped output in /proc/mounts. Reproduce the issue with a mount point containing tabs or newlines, then confirm that both commands resolve the original path and type correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, shell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.