mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* multi-tk.rb: modify security check at creating a new interpreter
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4b98d17022
commit
8951a69a16
2 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Sep 8 22:15:33 2003 <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* multi-tk.rb: modify security check at creating a new interpreter
|
||||
|
||||
Mon Sep 8 20:00:12 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/optparse.rb, lib/optparse/version.rb: search also all
|
||||
|
|
|
@ -459,12 +459,20 @@ class MultiTkIp
|
|||
######################################
|
||||
|
||||
def initialize(master, safeip=true, keys={})
|
||||
if safeip == nil && !master.master?
|
||||
fail SecurityError, "slave-ip cannot create master-ip"
|
||||
if $SAFE >= 4
|
||||
fail SecurityError, "cannot create a new interpreter at level #{$SAFE}"
|
||||
end
|
||||
|
||||
if safeip == nil && $SAFE >= 4
|
||||
fail SecurityError, "cannot create master-ip at level #{$SAFE}"
|
||||
if safeip == nil && $SAFE >= 2
|
||||
fail SecurityError, "cannot create a master-ip at level #{$SAFE}"
|
||||
end
|
||||
|
||||
if !master.master? && master.safe?
|
||||
fail SecurityError, "safe-slave-ip cannot create a new interpreter"
|
||||
end
|
||||
|
||||
if safeip == nil && !master.master?
|
||||
fail SecurityError, "slave-ip cannot create a master-ip"
|
||||
end
|
||||
|
||||
unless keys.kind_of? Hash
|
||||
|
|
Loading…
Reference in a new issue