From 9da4f78db46764be6dae5e7e83ff48cbecb3fb23 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 12 May 2000 09:07:57 +0000 Subject: 2000-05-12 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'file.c') diff --git a/file.c b/file.c index 19e44c4d13..421929d96f 100644 --- a/file.c +++ b/file.c @@ -25,6 +25,12 @@ #include #endif +#ifdef HAVE_SYS_FILE_H +# include +#else +int flock _((int, int)); +#endif + #ifdef HAVE_SYS_PARAM_H # include #else @@ -875,6 +881,7 @@ rb_file_s_chmod(argc, argv) VALUE rest; int mode, n; + rb_secure(2); rb_scan_args(argc, argv, "1*", &vmode, &rest); mode = NUM2INT(vmode); @@ -927,6 +934,7 @@ rb_file_s_chown(argc, argv) struct chown_args arg; int n; + rb_secure(2); rb_scan_args(argc, argv, "2*", &o, &g, &rest); if (NIL_P(o)) { arg.owner = -1; @@ -1377,6 +1385,7 @@ static VALUE rb_file_s_truncate(obj, path, len) VALUE obj, path, len; { + rb_secure(2); Check_SafeStr(path); #ifdef HAVE_TRUNCATE -- cgit v1.2.3