@@ -29,7 +29,7 @@ type argContainer struct {
2929 debug , init , zerokey , fusedebug , openssl , passwd , fg , version ,
3030 plaintextnames , quiet , nosyslog , wpanic ,
3131 longnames , allow_other , reverse , aessiv , nonempty , raw64 ,
32- noprealloc , speed , hkdf , serialize_reads , forcedecode , hh , info ,
32+ noprealloc , speed , hkdf , serialize_reads , hh , info ,
3333 sharedstorage , fsck , one_file_system , deterministic_names ,
3434 xchacha bool
3535 // Mount options with opposites
@@ -172,8 +172,6 @@ func parseCliOpts(osArgs []string) (args argContainer) {
172172 flagSet .BoolVar (& args .speed , "speed" , false , "Run crypto speed test" )
173173 flagSet .BoolVar (& args .hkdf , "hkdf" , true , "Use HKDF as an additional key derivation step" )
174174 flagSet .BoolVar (& args .serialize_reads , "serialize_reads" , false , "Try to serialize read operations" )
175- flagSet .BoolVar (& args .forcedecode , "forcedecode" , false , "Force decode of files even if integrity check fails." +
176- " Requires gocryptfs to be compiled with openssl support and implies -openssl true" )
177175 flagSet .BoolVar (& args .hh , "hh" , false , "Show this long help text" )
178176 flagSet .BoolVar (& args .info , "info" , false , "Display information about CIPHERDIR" )
179177 flagSet .BoolVar (& args .sharedstorage , "sharedstorage" , false , "Make concurrent access to a shared CIPHERDIR safer" )
@@ -234,7 +232,8 @@ func parseCliOpts(osArgs []string) (args argContainer) {
234232 {
235233 var tmp bool
236234 flagSet .BoolVar (& tmp , "nofail" , false , "Ignored for /etc/fstab compatibility" )
237- flagSet .BoolVar (& tmp , "devrandom" , false , "Deprecated (ignored for compatibility)" )
235+ flagSet .BoolVar (& tmp , "devrandom" , false , "Obsolete, ignored for compatibility" )
236+ flagSet .BoolVar (& tmp , "forcedecode" , false , "Obsolete, ignored for compatibility" )
238237 }
239238
240239 // Actual parsing
@@ -265,32 +264,6 @@ func parseCliOpts(osArgs []string) (args argContainer) {
265264 os .Exit (exitcodes .Usage )
266265 }
267266 }
268- // "-forcedecode" only works with openssl. Check compilation and command line parameters
269- if args .forcedecode {
270- if stupidgcm .BuiltWithoutOpenssl {
271- tlog .Fatal .Printf ("The -forcedecode flag requires openssl support, but gocryptfs was compiled without it!" )
272- os .Exit (exitcodes .Usage )
273- }
274- if args .aessiv {
275- tlog .Fatal .Printf ("The -forcedecode and -aessiv flags are incompatible because they use different crypto libs (openssl vs native Go)" )
276- os .Exit (exitcodes .Usage )
277- }
278- if args .reverse {
279- tlog .Fatal .Printf ("The reverse mode and the -forcedecode option are not compatible" )
280- os .Exit (exitcodes .Usage )
281- }
282- // Has the user explicitly disabled openssl using "-openssl=false/0"?
283- if ! args .openssl && opensslAuto != "auto" {
284- tlog .Fatal .Printf ("-forcedecode requires openssl, but is disabled via command-line option" )
285- os .Exit (exitcodes .Usage )
286- }
287- args .openssl = true
288-
289- // Try to make it harder for the user to shoot himself in the foot.
290- args .ro = true
291- args .allow_other = false
292- args .ko = "noexec"
293- }
294267 if len (args .extpass ) > 0 && len (args .passfile ) != 0 {
295268 tlog .Fatal .Printf ("The options -extpass and -passfile cannot be used at the same time" )
296269 os .Exit (exitcodes .Usage )
0 commit comments