ruby-changes:6216
From: matz <ko1@a...>
Date: Mon, 30 Jun 2008 10:31:50 +0900 (JST)
Subject: [ruby-changes:6216] Ruby:r17727 (ruby_1_8): * ext/syslog/syslog.c (syslog_write): syslog operations should be
matz 2008-06-30 10:31:25 +0900 (Mon, 30 Jun 2008)
New Revision: 17727
Modified files:
branches/ruby_1_8/ChangeLog
branches/ruby_1_8/ext/syslog/syslog.c
Log:
* ext/syslog/syslog.c (syslog_write): syslog operations should be
protected from $SAFE level 4. a patch from Keita Yamaguchi
<keita.yamaguchi at gmail.com>.
* ext/syslog/syslog.c (mSyslog_close): ditto.
* ext/syslog/syslog.c (mSyslog_set_mask): ditto.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=17727&r2=17726&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/syslog/syslog.c?r1=17727&r2=17726&diff_format=u
Index: ruby_1_8/ext/syslog/syslog.c
===================================================================
--- ruby_1_8/ext/syslog/syslog.c (revision 17726)
+++ ruby_1_8/ext/syslog/syslog.c (revision 17727)
@@ -22,6 +22,7 @@
{
VALUE str;
+ rb_secure(4);
if (argc < 1) {
rb_raise(rb_eArgError, "no log message supplied");
}
@@ -38,6 +39,7 @@
/* Syslog module methods */
static VALUE mSyslog_close(VALUE self)
{
+ rb_secure(4);
if (!syslog_opened) {
rb_raise(rb_eRuntimeError, "syslog not opened");
}
@@ -132,6 +134,7 @@
static VALUE mSyslog_set_mask(VALUE self, VALUE mask)
{
+ rb_secure(4);
if (!syslog_opened) {
rb_raise(rb_eRuntimeError, "must open syslog before setting log mask");
}
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog (revision 17726)
+++ ruby_1_8/ChangeLog (revision 17727)
@@ -1,3 +1,13 @@
+Mon Jun 30 10:28:33 2008 Yukihiro Matsumoto <matz@r...>
+
+ * ext/syslog/syslog.c (syslog_write): syslog operations should be
+ protected from $SAFE level 4. a patch from Keita Yamaguchi
+ <keita.yamaguchi at gmail.com>.
+
+ * ext/syslog/syslog.c (mSyslog_close): ditto.
+
+ * ext/syslog/syslog.c (mSyslog_set_mask): ditto.
+
Sun Jun 29 23:01:54 2008 Tanaka Akira <akr@f...>
* string.c (rb_str_format_m): make tmp volatile to avoid possible GC
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/