Skip to content

Commit

Permalink
merge revision(s) 17727:
Browse files Browse the repository at this point in the history
	* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_6@17807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
shyouhei committed Jul 2, 2008
1 parent 66be7ca commit 13b7f4c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions 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.
Expand Down
3 changes: 3 additions & 0 deletions ext/syslog/syslog.c
Expand Up @@ -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");
}
Expand All @@ -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");
}
Expand Down Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion version.h
Expand Up @@ -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
Expand Down

0 comments on commit 13b7f4c

Please sign in to comment.