summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-14 06:50:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-14 06:50:43 +0000
commit9d228b13deccfdf23f44e2c465f723a2a7b3bcbd (patch)
tree9a4d769804c389b6b03bbfdf65e8e0a03288c8e8 /process.c
parentc18d3740a925e8752c3b93acea6087fb0e03be53 (diff)
19991214
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/process.c b/process.c
index cecdaa6..c134a9e 100644
--- a/process.c
+++ b/process.c
@@ -831,6 +831,7 @@ proc_setpgid(obj, pid, pgrp)
#ifdef HAVE_SETPGID
int ipid, ipgrp;
+ rb_secure(2);
ipid = NUM2INT(pid);
ipgrp = NUM2INT(pgrp);
@@ -845,8 +846,10 @@ static VALUE
proc_setsid()
{
#ifdef HAVE_SETSID
- int pid = setsid();
+ int pid;
+ rb_secure(2);
+ pid = setsid();
if (pid < 0) rb_sys_fail(0);
return INT2FIX(pid);
#else
@@ -879,6 +882,7 @@ proc_setpriority(obj, which, who, prio)
#ifdef HAVE_GETPRIORITY
int iwhich, iwho, iprio;
+ rb_secure(2);
iwhich = NUM2INT(which);
iwho = NUM2INT(who);
iprio = NUM2INT(prio);
@@ -995,6 +999,7 @@ static VALUE
proc_setegid(obj, egid)
VALUE obj, egid;
{
+ rb_secure(2);
#ifdef HAVE_SETEGID
if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
#else