summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 09:56:56 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 09:56:56 (GMT)
commita25e2452f63e3716ae3c9943872efe583f4b91fb (patch)
tree90604c49cc021d9d7213323cab0b46bd6229b14a
parentd6163eaaa425df6cec81404d0f69d822bfae1529 (diff)
merge revision(s) 17727:
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--ext/syslog/syslog.c3
-rw-r--r--version.h2
3 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a2a89ef..faca511 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Wed Jul 2 18:55:50 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * 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.
+
Wed Jul 2 18:25:17 2008 Tanaka Akira <akr@fsij.org>
* math.c (domain_check): fix preprocess condition.
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index 477489d..ecc4931 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -22,6 +22,7 @@ static void syslog_write(int pri, int argc, VALUE *argv)
{
VALUE str;
+ rb_secure(4);
if (argc < 1) {
rb_raise(rb_eArgError, "no log message supplied");
}
@@ -38,6 +39,7 @@ static void syslog_write(int pri, int argc, VALUE *argv)
/* 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_get_mask(VALUE self)
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");
}
diff --git a/version.h b/version.h
index 56150d6..7fe491f 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-07-02"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080702
-#define RUBY_PATCHLEVEL 261
+#define RUBY_PATCHLEVEL 262
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8