diff options
author | Norbert Preining <preining@logic.at> | 2009-08-14 06:50:18 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-08-14 06:50:18 +0000 |
commit | 608d80efb6ecb33200f881b804aa19a144da0f14 (patch) | |
tree | 6e15758e7c3f5517f7e4fc76d1e5415a332361a9 /Master | |
parent | 8f2e28e54ec62dd309cd948efcd373f9c50d4d21 (diff) |
implement option in text and perltk installer to deactivate
restricted execution of programs via write18
git-svn-id: svn://tug.org/texlive/trunk@14659 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/install-tl | 15 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 6 | ||||
-rwxr-xr-x | Master/tlpkg/installer/install-menu-text.pl | 8 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc | 4 |
4 files changed, 32 insertions, 1 deletions
diff --git a/Master/install-tl b/Master/install-tl index eed559f1088..2617c6ea8df 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -905,6 +905,20 @@ sub do_texmf_cnf { EOF ; foreach (@changedtmf) { print TMF; } + # + # save the setting of shell_escape to the generated system texmf.cnf + # default in texmf/web2c/texmf.cnf is + # shell_escape = p + # so we write that only if the user *deselected* this option + if (!$vars{"option_restricted"}) { + print TMF <<EOF; +% Disable system commands via \\write18{...}. Please see +% texmf/web2c/texmf.cnf +% for more details. +shell_escape = 0 +EOF +; + } } else { $TMF = ">$vars{'TEXMFSYSVAR'}/web2c/texmf.cnf"; open (TMF, $TMF) || die "open($TMF) failed: $!\n"; @@ -1141,6 +1155,7 @@ sub load_tlpdb { $vars{'option_sys_bin'} = $tlpdb->option("sys_bin"); $vars{'option_sys_man'} = $tlpdb->option("sys_man"); $vars{'option_sys_info'} = $tlpdb->option("sys_info"); + $vars{'option_restricted'} = $tlpdb->option("restricted"); # check that the default scheme is actually present, otherwise switch to # scheme-minimal diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index de91f4e0a53..e4cbd30516f 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -80,6 +80,7 @@ my $fileassocyesno = $::fileassocdesc[$vars{'option_file_assocs'}]; my $editoryesno = ( $vars{'addon_editor'} ? __("Yes") : __("No") ); my $adminallyesno = ( $vars{'option_w32_multi_user'} ? __("Yes") : __("No") ); my $docyesno = ( $vars{'option_doc'} ? __("Yes") : __("No") ); +my $restrictedyesno = ( $vars{'option_restricted'} ? __("Yes") : __("No") ); $::run_menu = \&run_menu_perltk; @@ -253,6 +254,11 @@ sub run_menu_perltk { $fr->Label(-anchor => 'w', -textvariable => \$fmtyesno)->grid(-row => $row, -column => 2, -padx => "2m"); $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); + $row++; + $fr->Label(-text => __('Allow execution of restricted list of programs via \write18'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w'); + $fr->Label(-anchor => 'w', -textvariable => \$restrictedyesno)->grid(-row => $row, -column => 2, -padx => "2m"); + $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_restricted'}, \$restrictedyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); + if ($vars{'doc_splitting_supported'}) { $row++; $fr->Label(-text => __('Install font/macro doc tree'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w'); diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index b43077c3e65..a670ce4de3c 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -700,6 +700,7 @@ sub options_menu { my $b_deskint=button($vars{'option_desktop_integration'}); my $b_admin=button($vars{'option_w32_multi_user'}); my $b_addoneditor=button($vars{'addon_editor'}); + my $b_restricted = button($vars{'option_restricted'}); my $sys_bin=$vars{'option_sys_bin'}; my $sys_man=$vars{'option_sys_man'}; @@ -721,6 +722,7 @@ sub options_menu { print <<"EOF"; <P> use letter size instead of A4 by default: $b_letter <F> create format files: $b_fmt + <E> execution of restricted list of programs: $b_restricted EOF ; if ($vars{'doc_splitting_supported'} and !$vars{'from_dvd'}) { @@ -827,6 +829,10 @@ EOF toggle 'option_fmt'; return $command{'self'}; + } elsif ("\u$answer" eq 'E') { + toggle 'option_restricted'; + return $command{'self'}; + } elsif ("\u$answer" eq 'S' and !$vars{'from_dvd'}) { toggle 'option_src'; return $command{'self'}; @@ -880,6 +886,7 @@ sub main_menu { my $b_deskint=button($vars{'option_desktop_integration'}); my $b_admin=button($vars{'option_w32_multi_user'}); my $b_addoneditor=button($vars{'addon_editor'}); + my $b_restricted = button($vars{'option_restricted'}); my $warn_nobin; @@ -977,6 +984,7 @@ print <<"EOF"; <O> options: $b_letter use letter size instead of A4 by default $b_fmt create all format files + $b_restricted allow execution of restricted list of programs via \write18 EOF if (!$vars{'from_dvd'}) { diff --git a/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc b/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc index 088fd2954ff..3b3a6c9c78d 100644 --- a/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc +++ b/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc @@ -9,7 +9,8 @@ longdesc We have to remember these settings for additional package longdesc installation, removal, etc. longdesc longdesc In the tlpsrc itself only those options are saved that are used *ONLY* -longdesc at installation time, currently opt_paper, opt_path, opt_frozen. +longdesc at installation time, currently opt_paper, opt_path, opt_frozen, +longdesc and opt_restricted. longdesc These will longdesc be saved in the local tlpdb and will not be longdesc accessible by tlmgr. longdesc @@ -40,6 +41,7 @@ longdesc are never split into .src and .doc sub-packages in the tlpdb. depend opt_paper:a4 depend opt_path:0 +depend opt_restricted:1 # if we want to make a dist frozen uncomment that and tlmgr will bail out # telling that TLNNNN is frozen |