diff --git a/ChangeLog b/ChangeLog index 61f60ee065..6b615bd5f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Wed Jul 2 18:57:19 2008 Yukihiro Matsumoto + + * ext/syslog/syslog.c (syslog_write): syslog operations should be + protected from $SAFE level 4. a patch from Keita Yamaguchi + . + + * ext/syslog/syslog.c (mSyslog_close): ditto. + + * ext/syslog/syslog.c (mSyslog_set_mask): ditto. + Wed Jul 2 18:26:20 2008 Tanaka Akira * math.c (domain_check): fix preprocess condition. diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c index 477489ddfe..ecc49318f7 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 48a13938d3..7e93ce7ecb 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-07-02" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20080702 -#define RUBY_PATCHLEVEL 43 +#define RUBY_PATCHLEVEL 44 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8