Permalink
Browse files

Add field for CIFS version https://virtualmin.com/node/45199

  • Loading branch information...
1 parent 6551501 commit 4368bf87bb2275b36b65dd7a5cfbfa707d0fd479 @jcameron jcameron committed Jan 4, 2017
Showing with 13 additions and 0 deletions.
  1. +2 −0 mount/lang/en
  2. +11 −0 mount/linux-lib.pl
View
@@ -390,6 +390,8 @@ linux_iocharset=IO character set
linux_ecodepage=Missing or invalid code page
linux_eiocharset=Missing or invalid IO character set
linux_nounix=Disable CIFS Unix extensions?
+linux_cvers=CIFS version
+linux_ecvers=CIFS version must be a number
log_mount=Mounted $3
log_mount_l=Mounted $2 $1 on $3
View
@@ -1558,6 +1558,10 @@ sub generate_options
print &ui_table_row($text{'linux_nounix'},
&ui_yesno_radio("smbfs_nounix",
defined($options{"nounix"})));
+
+ print &ui_table_row($text{'linux_cvers'},
+ &ui_opt_textbox("smbfs_vers", $options{"vers"},
+ 5, $text{'linux_auto'}));
}
}
elsif ($type eq "reiserfs") {
@@ -2123,6 +2127,13 @@ sub check_options
delete($options{'nounix'});
if ($in{'smbfs_nounix'}) { $options{'nounix'} = ''; }
+
+ delete($options{'vers'});
+ if (!$in{'smbfs_vers_def'}) {
+ $in{'smbfs_vers'} =~ /^[0-9\.]+$/ ||
+ &error($text{'linux_ecvers'});
+ $options{'vers'} = $in{'smbfs_vers'};
+ }
}
}
elsif ($_[0] eq "reiserfs") {

0 comments on commit 4368bf8

Please sign in to comment.