puppet-fstab icon indicating copy to clipboard operation
puppet-fstab copied to clipboard

improper splitting of options

Open rsponholtz opened this issue 8 years ago • 0 comments

fstab_augeas_opts.rb splits the options by equal signs (=), and apparently throws the equal signs away. I'm trying to mount a CIFS filesystem that is in "azure files", and one of the options is a password that always ends in two equal signs (eg. "password=...=="). this function strips out the ending double equals sign. it seems like adding a limit of two on the split will correct this, i.e. value = opt.split '=',2. here is my test program:

opts= 'opt1,opt2=foo,foo="bar.baz==",option=password==,anotheroption=anotherpassword==' opts.split(',').each_with_index do |opt, idx| value = opt.split '=',2 print value print "\n" end

rsponholtz avatar Mar 21 '17 05:03 rsponholtz