main: ignore options rw, nosuid, nodev.

When called from mount, we always get either "suid" or "nosuid".
As "nosuid" is the default, just ignore the options. Same for
the other options.
This commit is contained in:
Jakob Unterwurzacher 2016-10-09 20:06:23 +02:00
parent 9cf3ced0ce
commit 03c8b13371

View File

@ -91,6 +91,13 @@ func parseCliOpts() (args argContainer) {
"successful mount - used internally for daemonization")
flagSet.IntVar(&args.scryptn, "scryptn", configfile.ScryptDefaultLogN, "scrypt cost parameter logN. "+
"Setting this to a lower value speeds up mounting but makes the password susceptible to brute-force attacks")
// Ignored otions
var ignoredBool bool
ignoreText := "(ignored for compatability)"
flagSet.BoolVar(&ignoredBool, "rw", false, ignoreText)
flagSet.BoolVar(&ignoredBool, "nosuid", false, ignoreText)
flagSet.BoolVar(&ignoredBool, "nodev", false, ignoreText)
// Actual parsing
flagSet.Parse(os.Args[1:])
// "-openssl" needs some post-processing