Minor usage string improvement
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 90/100
Research direction
Start in fscryptctl.c around lines 120-130, where the usage strings for add_key, remove_key, and key_status are defined. Replace the misleading MOUNTPOINT wording with PATH for all three commands, then run the tool's help or usage output to verify the updated text.
Written by the indexing model from the issue text.
Description
The usage string for add_key, remove_key, and key_status is somewhat misleading. These commands currently describe their path argument as a MOUNTPOINT, which suggests that the argument must be the root of the filesystem.
However, the implementation simply opens the supplied path and passes the resulting file descriptor to the corresponding fscrypt ioctl. The FS_IOC_ADD_ENCRYPTION_KEY, FS_IOC_REMOVE_ENCRYPTION_KEY, and FS_IOC_GET_ENCRYPTION_KEY_STATUS ioctls do not require the file descriptor to refer to the filesystem root. They can be executed on any file or directory on the target filesystem; the filesystem root is only recommended by the kernel documentation.
Consequently, a user who has a directory on the target filesystem should not need to first determine its mount point (for example, with findmnt) before using add_key, remove_key, or key_status. The current usage string implies that they do.
The usage string should therefore be generalized to describe the argument as a path on the target filesystem rather than specifically as a mount point.
For example, instead of:
fscryptctl add_key [OPTION...] MOUNTPOINT
the usage could use something like:
fscryptctl add_key [OPTION...] PATH
and similarly for remove_key and key_status.
- Dominant language
- C
- Stars
- 147
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/fscryptctl
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
google/fscryptctl#37 · 4 comments ·
All issues in google/fscryptctl
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100