canonical / canonical/multipass
[mounts] Make it easier to pass identical uid/gid mappings
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 828
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 44
Description
**What are you trying to do?**
With the new security restrictions in place for sshfs mounts, users will need to pass uid/gid mappings even when no real mapping is necessary. So we could make it easier to pass a mapping where the host uid/gid is equal to the remote one.
**What's your proposed solution?**
Allow the `--uid-map` and `--gid-map` options on the `mount` command to take in a single uid/gid instead of a pair and interpret it as an identical map e.g. have
```
mp mount -u 1000 -g 2000
```
be equivalent to
```
mp mount -u 1000:1000 -g 2000:2000
```
Contributor guide
Research direction
Trace the mount command's --uid-map and --gid-map option handling, starting with the CLI parsing entry point. Confirm how single values and uid:uid or gid:gid pairs are currently validated, then add coverage showing that a single value produces an identical mapping and that existing pair syntax remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100