mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
c63800069b
commit
eebb6bfc79
3 changed files with 5 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Dec 7 19:36:12 2014 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||
|
||||
* ext/socket/basicsocket.c, ext/socket/sockssocket.c:
|
||||
remove code for $SAFE=4.
|
||||
|
||||
Sun Dec 7 10:20:55 2014 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rdoc: Update to RDoc 4.2.0.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue