mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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@17727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
19c818ca57
commit
a80cd7ae9b
2 changed files with 13 additions and 0 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Mon Jun 30 10:28:33 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.
|
||||
|
||||
Sun Jun 29 23:01:54 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* string.c (rb_str_format_m): make tmp volatile to avoid possible GC
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue