Comment 1 for bug 917509

Revision history for this message
Sergio Peña (sergio-pena) wrote :

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?