summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-07 10:40:27 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-07 10:40:27 +0000
commiteebb6bfc79db53559e3cc5d3972f0f4d69651f46 (patch)
treed965ec3ad2ec96491473fc38d12db9cd89b5c5e8 /ext
parentc63800069b23df6e46af0a38fe21885315286068 (diff)
* ext/socket/basicsocket.c, ext/socket/sockssocket.c:
remove code for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/basicsocket.c9
-rw-r--r--ext/socket/sockssocket.c3
2 files changed, 0 insertions, 12 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index 088234a..5455977 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -66,9 +66,6 @@ bsock_shutdown(int argc, VALUE *argv, VALUE sock)
int how;
rb_io_t *fptr;
- if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
- rb_raise(rb_eSecurityError, "Insecure: can't shutdown socket");
- }
rb_scan_args(argc, argv, "01", &howto);
if (howto == Qnil)
how = SHUT_RDWR;
@@ -100,9 +97,6 @@ bsock_close_read(VALUE sock)
{
rb_io_t *fptr;
- if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
- rb_raise(rb_eSecurityError, "Insecure: can't close socket");
- }
GetOpenFile(sock, fptr);
shutdown(fptr->fd, 0);
if (!(fptr->mode & FMODE_WRITABLE)) {
@@ -133,9 +127,6 @@ bsock_close_write(VALUE sock)
{
rb_io_t *fptr;
- if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
- rb_raise(rb_eSecurityError, "Insecure: can't close socket");
- }
GetOpenFile(sock, fptr);
if (!(fptr->mode & FMODE_READABLE)) {
return rb_io_close(sock);
diff --git a/ext/socket/sockssocket.c b/ext/socket/sockssocket.c
index 48be4fc..81f77a6 100644
--- a/ext/socket/sockssocket.c
+++ b/ext/socket/sockssocket.c
@@ -41,9 +41,6 @@ socks_s_close(VALUE sock)
{
rb_io_t *fptr;
- if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
- rb_raise(rb_eSecurityError, "Insecure: can't close socket");
- }
GetOpenFile(sock, fptr);
shutdown(fptr->fd, 2);
return rb_io_close(sock);