diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-17 10:12:19 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-17 10:12:19 +0000 |
commit | 6c8ffdbf32121f49766dca934ae6be20d65d9ba6 (patch) | |
tree | e8a2d989f60c4580824683180a64e316b1c3d4b5 /process.c | |
parent | 3691ea5cf42b333a8607df1d2f6d9e22d747d5a1 (diff) |
* process.c (proc_getrlimit, proc_setrlimit): add rb_secure(2) to
methods of Process.{getrlimit,setrlimit}
patched by Kazuhiro NISHIYAMA <[email protected]>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1971,6 +1971,8 @@ proc_getrlimit(VALUE obj, VALUE resource) #ifdef HAVE_GETRLIMIT struct rlimit rlim; + rb_secure(2); + if (getrlimit(NUM2INT(resource), &rlim) < 0) { rb_sys_fail("getrlimit"); } @@ -2016,6 +2018,8 @@ proc_setrlimit(VALUE obj, VALUE resource, VALUE rlim_cur, VALUE rlim_max) #ifdef HAVE_SETRLIMIT struct rlimit rlim; + rb_secure(2); + rlim.rlim_cur = NUM2RLIM(rlim_cur); rlim.rlim_max = NUM2RLIM(rlim_max); |