summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorEric Hodel <[email protected]>2016-05-12 17:47:56 -0700
committerEric Hodel <[email protected]>2016-05-12 17:55:14 -0700
commit11961b42ac7a15fc59da3acd2dc83935ea879557 (patch)
tree7e9abee660a344276d54c40b5b964486c3ac1827 /test
parent777cf70cc52e52dcce41585db5b19e997b40e65c (diff)
downloadmruby-11961b42ac7a15fc59da3acd2dc83935ea879557.tar.gz
mruby-11961b42ac7a15fc59da3acd2dc83935ea879557.zip
Create socket in /tmp for security
Some systems do not allow UNIX sockets from arbitrary directories. Instead of trying to `#define SOCKET_PATH` correctly I assume the /tmp/ directory is accessible and use it.
Diffstat (limited to 'test')
-rw-r--r--test/mruby_io_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/mruby_io_test.c b/test/mruby_io_test.c
index fdd20d226..ca0f818a1 100644
--- a/test/mruby_io_test.c
+++ b/test/mruby_io_test.c
@@ -25,7 +25,7 @@ mrb_io_test_io_setup(mrb_state *mrb, mrb_value self)
char rfname[] = "tmp.mruby-io-test.XXXXXXXX";
char wfname[] = "tmp.mruby-io-test.XXXXXXXX";
char symlinkname[] = "tmp.mruby-io-test.XXXXXXXX";
- char socketname[] = "tmp.mruby-io-test.XXXXXXXX";
+ char socketname[] = "/tmp/mruby-io-test.XXXXXXXX";
char msg[] = "mruby io test\n";
mode_t mask;
int fd0, fd1, fd2, fd3;