summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
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);