3 # Create a new, empty share that is a copy of an existing one
5 require './samba-lib.pl';
10 &error_setup("<blink><font color=red>$text{'eacl_aviol'}</font></blink>");
11 &error("$text{'eacl_np'} $text{'eacl_pcopy'}") unless $access{'copy'};
13 &error_setup($text{'savecopy_fail'});
14 &lock_file($config{'smb_conf'});
15 $in{'name'} || &error($text{'savecopy_ename'});
16 if ($in{"name"} eq "global") {
17 &error($text{'savecopy_global'});
19 if (&indexof($in{"name"}, &list_shares()) >= 0) {
20 &error(&text('savecopy_exist', $in{name}));
22 &setval("copy", $in{copy});
23 &create_share($in{name});
24 &unlock_file($config{'smb_conf'});
25 &webmin_log("copy", undef, $in{'name'}, \%in);