summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/init.c2
-rw-r--r--ext/socket/socket.c4
-rw-r--r--ext/socket/tcpsocket.c1
-rw-r--r--ext/socket/udpsocket.c4
4 files changed, 0 insertions, 11 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index ab6b52aab34..34f6a116f02 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -555,7 +555,6 @@ rsock_s_accept_nonblock(int argc, VALUE *argv, VALUE klass, rb_io_t *fptr,
rb_scan_args(argc, argv, "0:", &opts);
- rb_secure(3);
rb_io_set_nonblock(fptr);
fd2 = cloexec_accept(fptr->fd, (struct sockaddr*)sockaddr, len, 1);
if (fd2 < 0) {
@@ -598,7 +597,6 @@ rsock_s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len)
int retry = 0;
struct accept_arg arg;
- rb_secure(3);
arg.fd = fd;
arg.sockaddr = sockaddr;
arg.len = len;
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index f2d4323a894..2cda4cbaf5c 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -140,7 +140,6 @@ sock_initialize(int argc, VALUE *argv, VALUE sock)
if (NIL_P(protocol))
protocol = INT2FIX(0);
- rb_secure(3);
setup_domain_and_type(domain, &d, type, &t);
fd = rsock_socket(d, t, NUM2INT(protocol));
if (fd < 0) rb_sys_fail("socket(2)");
@@ -1059,7 +1058,6 @@ sock_gethostname(VALUE obj)
char buf[RUBY_MAX_HOST_NAME_LEN+1];
- rb_secure(3);
if (gethostname(buf, (int)sizeof buf - 1) < 0)
rb_sys_fail("gethostname(3)");
@@ -1076,7 +1074,6 @@ sock_gethostname(VALUE obj)
{
struct utsname un;
- rb_secure(3);
uname(&un);
return rb_str_new2(un.nodename);
}
@@ -1143,7 +1140,6 @@ sock_sockaddr(struct sockaddr *addr, socklen_t len)
static VALUE
sock_s_gethostbyname(VALUE obj, VALUE host)
{
- rb_secure(3);
return rsock_make_hostent(host, rsock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);
}
diff --git a/ext/socket/tcpsocket.c b/ext/socket/tcpsocket.c
index 6217e424d9a..65943a7a596 100644
--- a/ext/socket/tcpsocket.c
+++ b/ext/socket/tcpsocket.c
@@ -50,7 +50,6 @@ tcp_sockaddr(struct sockaddr *addr, socklen_t len)
static VALUE
tcp_s_gethostbyname(VALUE obj, VALUE host)
{
- rb_secure(3);
return rsock_make_hostent(host, rsock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME),
tcp_sockaddr);
}
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index c4fdd5a8573..3425a50501e 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -30,7 +30,6 @@ udp_init(int argc, VALUE *argv, VALUE sock)
int family = AF_INET;
int fd;
- rb_secure(3);
if (rb_scan_args(argc, argv, "01", &arg) == 1) {
family = rsock_family_arg(arg);
}
@@ -85,7 +84,6 @@ udp_connect(VALUE sock, VALUE host, VALUE port)
struct udp_arg arg;
VALUE ret;
- rb_secure(3);
arg.res = rsock_addrinfo(host, port, SOCK_DGRAM, 0);
GetOpenFile(sock, fptr);
arg.fd = fptr->fd;
@@ -114,7 +112,6 @@ udp_bind(VALUE sock, VALUE host, VALUE port)
struct rb_addrinfo *res0;
struct addrinfo *res;
- rb_secure(3);
res0 = rsock_addrinfo(host, port, SOCK_DGRAM, 0);
GetOpenFile(sock, fptr);
for (res = res0->ai; res; res = res->ai_next) {
@@ -267,4 +264,3 @@ rsock_init_udpsocket(void)
rb_define_method(rb_cUDPSocket, "send", udp_send, -1);
rb_define_method(rb_cUDPSocket, "recvfrom_nonblock", udp_recvfrom_nonblock, -1);
}
-