* process.c (proc_getpgrp): prohibit for $SAFE=2.
[ruby-dev:24899] * process.c (get_pid): ditto. [ruby-dev:24904] * process.c (get_ppid): ditto. * array.c (rb_ary_delete): defer rb_ary_modify() until actual modification. [ruby-dev:24901] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
76fd9b85d9
commit
b28b7933a8
31
ChangeLog
31
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
Thu Nov 18 00:21:15 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* process.c (proc_getpgrp): prohibit for $SAFE=2.
|
||||||
|
[ruby-dev:24899]
|
||||||
|
|
||||||
|
* process.c (get_pid): ditto. [ruby-dev:24904]
|
||||||
|
|
||||||
|
* process.c (get_ppid): ditto.
|
||||||
|
|
||||||
|
* array.c (rb_ary_delete): defer rb_ary_modify() until actual
|
||||||
|
modification. [ruby-dev:24901]
|
||||||
|
|
||||||
Thu Nov 18 10:10:14 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Nov 18 10:10:14 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* io.c, rubyio.h (rb_io_modenum_flags): exported.
|
* io.c, rubyio.h (rb_io_modenum_flags): exported.
|
||||||
@ -9,20 +21,29 @@ Wed Nov 17 23:47:30 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
|
|||||||
|
|
||||||
* test/ruby/test_settracefunc.rb: added. [ruby-dev:24884]
|
* test/ruby/test_settracefunc.rb: added. [ruby-dev:24884]
|
||||||
|
|
||||||
Wed Nov 17 11:48:17 2004 Michael Neumann <mneumann@ruby-lang.org>
|
|
||||||
|
|
||||||
* lib/xmlrpc/parser.rb, test/xmlrpc/test_features.rb: fixed "assinging
|
|
||||||
to constants" warnings
|
|
||||||
|
|
||||||
Wed Nov 17 18:59:16 2004 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
Wed Nov 17 18:59:16 2004 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
* process.c (proc_getrlimit, proc_setrlimit): add rb_secure(2) to
|
* process.c (proc_getrlimit, proc_setrlimit): add rb_secure(2) to
|
||||||
methods of Process.{getrlimit,setrlimit}
|
methods of Process.{getrlimit,setrlimit}
|
||||||
|
|
||||||
|
Wed Nov 17 13:56:57 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (newline_node): should not use FL_SET. [ruby-dev:24874]
|
||||||
|
|
||||||
|
* parse.y (string_content): should not use FL_UNSET.
|
||||||
|
|
||||||
|
* node.h (NODE_NEWLINE): remove unused bit to utilize flag field
|
||||||
|
in nodes.
|
||||||
|
|
||||||
Wed Nov 17 13:05:10 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Nov 17 13:05:10 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* dir.c (rb_push_glob): fix overrun. [ruby-dev:24886]
|
* dir.c (rb_push_glob): fix overrun. [ruby-dev:24886]
|
||||||
|
|
||||||
|
Wed Nov 17 11:48:17 2004 Michael Neumann <mneumann@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/xmlrpc/parser.rb, test/xmlrpc/test_features.rb: fixed "assinging
|
||||||
|
to constants" warnings
|
||||||
|
|
||||||
Wed Nov 17 09:38:18 2004 Johan Holmberg <holmberg@iar.se>
|
Wed Nov 17 09:38:18 2004 Johan Holmberg <holmberg@iar.se>
|
||||||
|
|
||||||
* re.c (rb_reg_initialize_m): should raise exception instead of
|
* re.c (rb_reg_initialize_m): should raise exception instead of
|
||||||
|
26
array.c
26
array.c
@ -363,7 +363,6 @@ rb_ary_initialize(argc, argv, ary)
|
|||||||
long len;
|
long len;
|
||||||
VALUE size, val;
|
VALUE size, val;
|
||||||
|
|
||||||
rb_ary_modify(ary);
|
|
||||||
if (rb_scan_args(argc, argv, "02", &size, &val) == 0) {
|
if (rb_scan_args(argc, argv, "02", &size, &val) == 0) {
|
||||||
RARRAY(ary)->len = 0;
|
RARRAY(ary)->len = 0;
|
||||||
if (rb_block_given_p()) {
|
if (rb_block_given_p()) {
|
||||||
@ -387,6 +386,7 @@ rb_ary_initialize(argc, argv, ary)
|
|||||||
if (len > 0 && len * (long)sizeof(VALUE) <= len) {
|
if (len > 0 && len * (long)sizeof(VALUE) <= len) {
|
||||||
rb_raise(rb_eArgError, "array size too big");
|
rb_raise(rb_eArgError, "array size too big");
|
||||||
}
|
}
|
||||||
|
rb_ary_modify(ary);
|
||||||
if (len > RARRAY(ary)->aux.capa) {
|
if (len > RARRAY(ary)->aux.capa) {
|
||||||
REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
|
REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
|
||||||
RARRAY(ary)->aux.capa = len;
|
RARRAY(ary)->aux.capa = len;
|
||||||
@ -445,7 +445,6 @@ rb_ary_store(ary, idx, val)
|
|||||||
long idx;
|
long idx;
|
||||||
VALUE val;
|
VALUE val;
|
||||||
{
|
{
|
||||||
rb_ary_modify(ary);
|
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
idx += RARRAY(ary)->len;
|
idx += RARRAY(ary)->len;
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
@ -454,6 +453,7 @@ rb_ary_store(ary, idx, val)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rb_ary_modify(ary);
|
||||||
if (idx >= RARRAY(ary)->aux.capa) {
|
if (idx >= RARRAY(ary)->aux.capa) {
|
||||||
long new_capa = RARRAY(ary)->aux.capa / 2;
|
long new_capa = RARRAY(ary)->aux.capa / 2;
|
||||||
|
|
||||||
@ -1071,7 +1071,7 @@ rb_ary_to_ary(obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rb_ary_update(ary, beg, len, rpl)
|
rb_ary_splice(ary, beg, len, rpl)
|
||||||
VALUE ary;
|
VALUE ary;
|
||||||
long beg, len;
|
long beg, len;
|
||||||
VALUE rpl;
|
VALUE rpl;
|
||||||
@ -1172,7 +1172,7 @@ rb_ary_aset(argc, argv, ary)
|
|||||||
long offset, beg, len;
|
long offset, beg, len;
|
||||||
|
|
||||||
if (argc == 3) {
|
if (argc == 3) {
|
||||||
rb_ary_update(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
|
rb_ary_splice(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
|
||||||
return argv[2];
|
return argv[2];
|
||||||
}
|
}
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
@ -1184,7 +1184,7 @@ rb_ary_aset(argc, argv, ary)
|
|||||||
}
|
}
|
||||||
if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
|
if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
|
||||||
/* check if idx is Range */
|
/* check if idx is Range */
|
||||||
rb_ary_update(ary, beg, len, argv[1]);
|
rb_ary_splice(ary, beg, len, argv[1]);
|
||||||
return argv[1];
|
return argv[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1226,7 +1226,7 @@ rb_ary_insert(argc, argv, ary)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (argc == 1) return ary;
|
if (argc == 1) return ary;
|
||||||
rb_ary_update(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1));
|
rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1));
|
||||||
return ary;
|
return ary;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1968,7 +1968,6 @@ rb_ary_delete(ary, item)
|
|||||||
{
|
{
|
||||||
long i1, i2;
|
long i1, i2;
|
||||||
|
|
||||||
rb_ary_modify(ary);
|
|
||||||
for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
|
for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
|
||||||
VALUE e = RARRAY(ary)->ptr[i1];
|
VALUE e = RARRAY(ary)->ptr[i1];
|
||||||
|
|
||||||
@ -1985,6 +1984,7 @@ rb_ary_delete(ary, item)
|
|||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rb_ary_modify(ary);
|
||||||
if (RARRAY(ary)->len > i2) {
|
if (RARRAY(ary)->len > i2) {
|
||||||
RARRAY(ary)->len = i2;
|
RARRAY(ary)->len = i2;
|
||||||
if (i2 * 2 < RARRAY(ary)->aux.capa &&
|
if (i2 * 2 < RARRAY(ary)->aux.capa &&
|
||||||
@ -2005,13 +2005,13 @@ rb_ary_delete_at(ary, pos)
|
|||||||
long i, len = RARRAY(ary)->len;
|
long i, len = RARRAY(ary)->len;
|
||||||
VALUE del;
|
VALUE del;
|
||||||
|
|
||||||
rb_ary_modify(ary);
|
|
||||||
if (pos >= len) return Qnil;
|
if (pos >= len) return Qnil;
|
||||||
if (pos < 0) {
|
if (pos < 0) {
|
||||||
pos += len;
|
pos += len;
|
||||||
if (pos < 0) return Qnil;
|
if (pos < 0) return Qnil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rb_ary_modify(ary);
|
||||||
del = RARRAY(ary)->ptr[pos];
|
del = RARRAY(ary)->ptr[pos];
|
||||||
for (i = pos + 1; i < len; i++, pos++) {
|
for (i = pos + 1; i < len; i++, pos++) {
|
||||||
RARRAY(ary)->ptr[pos] = RARRAY(ary)->ptr[i];
|
RARRAY(ary)->ptr[pos] = RARRAY(ary)->ptr[i];
|
||||||
@ -2076,7 +2076,6 @@ rb_ary_slice_bang(argc, argv, ary)
|
|||||||
VALUE arg1, arg2;
|
VALUE arg1, arg2;
|
||||||
long pos, len;
|
long pos, len;
|
||||||
|
|
||||||
rb_ary_modify(ary);
|
|
||||||
if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
|
if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
|
||||||
pos = NUM2LONG(arg1);
|
pos = NUM2LONG(arg1);
|
||||||
len = NUM2LONG(arg2);
|
len = NUM2LONG(arg2);
|
||||||
@ -2085,7 +2084,7 @@ rb_ary_slice_bang(argc, argv, ary)
|
|||||||
pos = RARRAY(ary)->len + pos;
|
pos = RARRAY(ary)->len + pos;
|
||||||
}
|
}
|
||||||
arg2 = rb_ary_subseq(ary, pos, len);
|
arg2 = rb_ary_subseq(ary, pos, len);
|
||||||
rb_ary_update(ary, pos, len, Qundef); /* Qnil/rb_ary_new2(0) */
|
rb_ary_splice(ary, pos, len, Qundef); /* Qnil/rb_ary_new2(0) */
|
||||||
return arg2;
|
return arg2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2457,7 +2456,7 @@ rb_ary_concat(x, y)
|
|||||||
{
|
{
|
||||||
y = to_ary(y);
|
y = to_ary(y);
|
||||||
if (RARRAY(y)->len > 0) {
|
if (RARRAY(y)->len > 0) {
|
||||||
rb_ary_update(x, RARRAY(x)->len, 0, y);
|
rb_ary_splice(x, RARRAY(x)->len, 0, y);
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
@ -2873,8 +2872,6 @@ rb_ary_uniq_bang(ary)
|
|||||||
VALUE hash, v, vv;
|
VALUE hash, v, vv;
|
||||||
long i, j;
|
long i, j;
|
||||||
|
|
||||||
rb_ary_modify(ary);
|
|
||||||
|
|
||||||
hash = ary_make_hash(ary, 0);
|
hash = ary_make_hash(ary, 0);
|
||||||
|
|
||||||
if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
|
if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
|
||||||
@ -3005,7 +3002,7 @@ flatten(ary, idx, ary2, memo)
|
|||||||
rb_raise(rb_eArgError, "tried to flatten recursive array");
|
rb_raise(rb_eArgError, "tried to flatten recursive array");
|
||||||
}
|
}
|
||||||
rb_ary_push(memo, id);
|
rb_ary_push(memo, id);
|
||||||
rb_ary_update(ary, idx, 1, ary2);
|
rb_ary_splice(ary, idx, 1, ary2);
|
||||||
while (i < lim) {
|
while (i < lim) {
|
||||||
VALUE tmp;
|
VALUE tmp;
|
||||||
|
|
||||||
@ -3043,7 +3040,6 @@ rb_ary_flatten_bang(ary)
|
|||||||
int mod = 0;
|
int mod = 0;
|
||||||
VALUE memo = Qnil;
|
VALUE memo = Qnil;
|
||||||
|
|
||||||
rb_ary_modify(ary);
|
|
||||||
while (i<RARRAY(ary)->len) {
|
while (i<RARRAY(ary)->len) {
|
||||||
VALUE ary2 = RARRAY(ary)->ptr[i];
|
VALUE ary2 = RARRAY(ary)->ptr[i];
|
||||||
VALUE tmp;
|
VALUE tmp;
|
||||||
|
6
parse.y
6
parse.y
@ -6507,9 +6507,9 @@ static NODE*
|
|||||||
newline_node(node)
|
newline_node(node)
|
||||||
NODE *node;
|
NODE *node;
|
||||||
{
|
{
|
||||||
if (node) {
|
if (node) {
|
||||||
node->flags |= NODE_NEWLINE;
|
node->flags |= NODE_NEWLINE;
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
54
process.c
54
process.c
@ -130,6 +130,7 @@ static VALUE S_Tms;
|
|||||||
static VALUE
|
static VALUE
|
||||||
get_pid()
|
get_pid()
|
||||||
{
|
{
|
||||||
|
rb_secure(2);
|
||||||
return INT2FIX(getpid());
|
return INT2FIX(getpid());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +154,7 @@ get_pid()
|
|||||||
static VALUE
|
static VALUE
|
||||||
get_ppid()
|
get_ppid()
|
||||||
{
|
{
|
||||||
|
rb_secure(2);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return INT2FIX(0);
|
return INT2FIX(0);
|
||||||
#else
|
#else
|
||||||
@ -730,6 +732,7 @@ proc_wait(argc, argv)
|
|||||||
VALUE vpid, vflags;
|
VALUE vpid, vflags;
|
||||||
int pid, flags, status;
|
int pid, flags, status;
|
||||||
|
|
||||||
|
rb_secure(2);
|
||||||
flags = 0;
|
flags = 0;
|
||||||
rb_scan_args(argc, argv, "02", &vpid, &vflags);
|
rb_scan_args(argc, argv, "02", &vpid, &vflags);
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
@ -804,6 +807,7 @@ proc_waitall()
|
|||||||
VALUE result;
|
VALUE result;
|
||||||
int pid, status;
|
int pid, status;
|
||||||
|
|
||||||
|
rb_secure(2);
|
||||||
result = rb_ary_new();
|
result = rb_ary_new();
|
||||||
#ifdef NO_WAITPID
|
#ifdef NO_WAITPID
|
||||||
if (pid_tbl) {
|
if (pid_tbl) {
|
||||||
@ -910,6 +914,7 @@ static VALUE
|
|||||||
proc_detach(obj, pid)
|
proc_detach(obj, pid)
|
||||||
VALUE pid;
|
VALUE pid;
|
||||||
{
|
{
|
||||||
|
rb_secure(2);
|
||||||
return rb_detach_process(NUM2INT(pid));
|
return rb_detach_process(NUM2INT(pid));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1720,6 +1725,7 @@ proc_getpgrp()
|
|||||||
{
|
{
|
||||||
int pgrp;
|
int pgrp;
|
||||||
|
|
||||||
|
rb_secure(2);
|
||||||
#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)
|
#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)
|
||||||
pgrp = getpgrp();
|
pgrp = getpgrp();
|
||||||
if (pgrp < 0) rb_sys_fail(0);
|
if (pgrp < 0) rb_sys_fail(0);
|
||||||
@ -1747,12 +1753,13 @@ proc_getpgrp()
|
|||||||
static VALUE
|
static VALUE
|
||||||
proc_setpgrp()
|
proc_setpgrp()
|
||||||
{
|
{
|
||||||
|
rb_secure(2);
|
||||||
/* check for posix setpgid() first; this matches the posix */
|
/* check for posix setpgid() first; this matches the posix */
|
||||||
/* getpgrp() above. It appears that configure will set SETPGRP_VOID */
|
/* getpgrp() above. It appears that configure will set SETPGRP_VOID */
|
||||||
/* even though setpgrp(0,0) would be prefered. The posix call avoids */
|
/* even though setpgrp(0,0) would be prefered. The posix call avoids */
|
||||||
/* this confusion. */
|
/* this confusion. */
|
||||||
#ifdef HAVE_SETPGID
|
#ifdef HAVE_SETPGID
|
||||||
if (setpgid(0,0) < 0) rb_sys_fail(0);
|
if (setpgid(0,0) < 0) rb_sys_fail(0);
|
||||||
#elif defined(HAVE_SETPGRP) && defined(SETPGRP_VOID)
|
#elif defined(HAVE_SETPGRP) && defined(SETPGRP_VOID)
|
||||||
if (setpgrp() < 0) rb_sys_fail(0);
|
if (setpgrp() < 0) rb_sys_fail(0);
|
||||||
#else
|
#else
|
||||||
@ -1777,8 +1784,10 @@ proc_getpgid(obj, pid)
|
|||||||
VALUE obj, pid;
|
VALUE obj, pid;
|
||||||
{
|
{
|
||||||
#if defined(HAVE_GETPGID) && !defined(__CHECKER__)
|
#if defined(HAVE_GETPGID) && !defined(__CHECKER__)
|
||||||
int i = getpgid(NUM2INT(pid));
|
int i;
|
||||||
|
|
||||||
|
rb_secure(2);
|
||||||
|
i = getpgid(NUM2INT(pid));
|
||||||
if (i < 0) rb_sys_fail(0);
|
if (i < 0) rb_sys_fail(0);
|
||||||
return INT2NUM(i);
|
return INT2NUM(i);
|
||||||
#else
|
#else
|
||||||
@ -1886,6 +1895,7 @@ proc_getpriority(obj, which, who)
|
|||||||
#ifdef HAVE_GETPRIORITY
|
#ifdef HAVE_GETPRIORITY
|
||||||
int prio, iwhich, iwho;
|
int prio, iwhich, iwho;
|
||||||
|
|
||||||
|
rb_secure(2);
|
||||||
iwhich = NUM2INT(which);
|
iwhich = NUM2INT(which);
|
||||||
iwho = NUM2INT(who);
|
iwho = NUM2INT(who);
|
||||||
|
|
||||||
@ -2545,6 +2555,7 @@ p_sys_issetugid(obj)
|
|||||||
VALUE obj;
|
VALUE obj;
|
||||||
{
|
{
|
||||||
#if defined HAVE_ISSETUGID
|
#if defined HAVE_ISSETUGID
|
||||||
|
rb_secure(2);
|
||||||
if (issetugid()) {
|
if (issetugid()) {
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
} else {
|
} else {
|
||||||
@ -3794,26 +3805,18 @@ Init_process()
|
|||||||
rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0);
|
rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0);
|
||||||
rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0);
|
rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0);
|
||||||
rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0);
|
rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0);
|
||||||
rb_define_module_function(rb_mProcUID, "change_privilege",
|
rb_define_module_function(rb_mProcUID, "change_privilege", p_uid_change_privilege, 1);
|
||||||
p_uid_change_privilege, 1);
|
rb_define_module_function(rb_mProcGID, "change_privilege", p_gid_change_privilege, 1);
|
||||||
rb_define_module_function(rb_mProcGID, "change_privilege",
|
rb_define_module_function(rb_mProcUID, "grant_privilege", p_uid_grant_privilege, 1);
|
||||||
p_gid_change_privilege, 1);
|
rb_define_module_function(rb_mProcGID, "grant_privilege", p_gid_grant_privilege, 1);
|
||||||
rb_define_module_function(rb_mProcUID, "grant_privilege",
|
|
||||||
p_uid_grant_privilege, 1);
|
|
||||||
rb_define_module_function(rb_mProcGID, "grant_privilege",
|
|
||||||
p_gid_grant_privilege, 1);
|
|
||||||
rb_define_alias(rb_mProcUID, "eid=", "grant_privilege");
|
rb_define_alias(rb_mProcUID, "eid=", "grant_privilege");
|
||||||
rb_define_alias(rb_mProcGID, "eid=", "grant_privilege");
|
rb_define_alias(rb_mProcGID, "eid=", "grant_privilege");
|
||||||
rb_define_module_function(rb_mProcUID, "re_exchange", p_uid_exchange, 0);
|
rb_define_module_function(rb_mProcUID, "re_exchange", p_uid_exchange, 0);
|
||||||
rb_define_module_function(rb_mProcGID, "re_exchange", p_gid_exchange, 0);
|
rb_define_module_function(rb_mProcGID, "re_exchange", p_gid_exchange, 0);
|
||||||
rb_define_module_function(rb_mProcUID, "re_exchangeable?",
|
rb_define_module_function(rb_mProcUID, "re_exchangeable?", p_uid_exchangeable, 0);
|
||||||
p_uid_exchangeable, 0);
|
rb_define_module_function(rb_mProcGID, "re_exchangeable?", p_gid_exchangeable, 0);
|
||||||
rb_define_module_function(rb_mProcGID, "re_exchangeable?",
|
rb_define_module_function(rb_mProcUID, "sid_available?", p_uid_have_saved_id, 0);
|
||||||
p_gid_exchangeable, 0);
|
rb_define_module_function(rb_mProcGID, "sid_available?", p_gid_have_saved_id, 0);
|
||||||
rb_define_module_function(rb_mProcUID, "sid_available?",
|
|
||||||
p_uid_have_saved_id, 0);
|
|
||||||
rb_define_module_function(rb_mProcGID, "sid_available?",
|
|
||||||
p_gid_have_saved_id, 0);
|
|
||||||
rb_define_module_function(rb_mProcUID, "switch", p_uid_switch, 0);
|
rb_define_module_function(rb_mProcUID, "switch", p_uid_switch, 0);
|
||||||
rb_define_module_function(rb_mProcGID, "switch", p_gid_switch, 0);
|
rb_define_module_function(rb_mProcGID, "switch", p_gid_switch, 0);
|
||||||
|
|
||||||
@ -3833,15 +3836,10 @@ Init_process()
|
|||||||
rb_define_module_function(rb_mProcID_Syscall, "seteuid", p_sys_seteuid, 1);
|
rb_define_module_function(rb_mProcID_Syscall, "seteuid", p_sys_seteuid, 1);
|
||||||
rb_define_module_function(rb_mProcID_Syscall, "setegid", p_sys_setegid, 1);
|
rb_define_module_function(rb_mProcID_Syscall, "setegid", p_sys_setegid, 1);
|
||||||
|
|
||||||
rb_define_module_function(rb_mProcID_Syscall, "setreuid",
|
rb_define_module_function(rb_mProcID_Syscall, "setreuid", p_sys_setreuid, 2);
|
||||||
p_sys_setreuid, 2);
|
rb_define_module_function(rb_mProcID_Syscall, "setregid", p_sys_setregid, 2);
|
||||||
rb_define_module_function(rb_mProcID_Syscall, "setregid",
|
|
||||||
p_sys_setregid, 2);
|
|
||||||
|
|
||||||
rb_define_module_function(rb_mProcID_Syscall, "setresuid",
|
rb_define_module_function(rb_mProcID_Syscall, "setresuid", p_sys_setresuid, 3);
|
||||||
p_sys_setresuid, 3);
|
rb_define_module_function(rb_mProcID_Syscall, "setresgid", p_sys_setresgid, 3);
|
||||||
rb_define_module_function(rb_mProcID_Syscall, "setresgid",
|
rb_define_module_function(rb_mProcID_Syscall, "issetugid", p_sys_issetugid, 0);
|
||||||
p_sys_setresgid, 3);
|
|
||||||
rb_define_module_function(rb_mProcID_Syscall, "issetugid",
|
|
||||||
p_sys_issetugid, 0);
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user