diff options
| author | Jakob Unterwurzacher | 2016-10-09 20:06:23 +0200 | 
|---|---|---|
| committer | Jakob Unterwurzacher | 2016-10-09 20:06:23 +0200 | 
| commit | 03c8b133710c190364858de09b2f24c5fa891d88 (patch) | |
| tree | 79741f8409c06b5ef2148dc187075781a670b3f8 | |
| parent | 9cf3ced0ce95495cabd8f4e7055d1c98f42363c9 (diff) | |
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.
| -rw-r--r-- | cli_args.go | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/cli_args.go b/cli_args.go index 0db5ba6..4f16cd4 100644 --- a/cli_args.go +++ b/cli_args.go @@ -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 | 
