Mount helper doesn't handle all mount flags properly
Bug #917509 reported by
Tyler Hicks
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eCryptfs |
Fix Released
|
Medium
|
Sergio Peña |
Bug Description
Martin Steigerwald reported that mount.ecryptfs doesn't handle all mount options properly:
http://
Martin specifically mentions noatime and noauto, but verification should be performed to be sure that there are not others.
ecryptfs_
Related branches
lp://staging/~sergio-pena/ecryptfs/917509
- Dustin Kirkland : Needs Fixing
- Tyler Hicks: Needs Fixing
-
Diff: 311 lines (+85/-166)3 files modifiedsrc/include/ecryptfs.h (+0/-1)
src/libecryptfs/main.c (+0/-100)
src/utils/mount.ecryptfs.c (+85/-65)
Changed in ecryptfs: | |
assignee: | nobody → Sergio Peña (sergio-pena) |
status: | Triaged → In Progress |
To post a comment you must log in.
As a suggestion, Tyler told me that we might call /"sbin/mount -i" using exec() instead of adding more flags into ecryptfs_ generate_ mount_flags( ).
The idea is a good solution to support all new flags from mount command without touching the ecryptfs code to add others ones.
I looked into some others mount helpers, such as nfs, cifs, smbfs, fuse, to see how they support these flags, but they use the same solution as ecryptfs. They uses mount() API function, and have a bigger list of mount flags that they check before call the mount() function.
mount.fuse is the only one that uses execl() to call a fuse command to mount a directory, but it does not call /sbin/mount; it uses its own fuse command instead; and flags are checked and ignored before calling the command.
Either way, I don't foresee any issues if we use exec() or execl() to call "/sbin/mount -i ecryptfs SOURCE DEST -o OPTS" in order to mount ecryptfs.
Any ideas or comments about this?