mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
More verbose message at unsafe header
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fc1f476b61
commit
6d497629b2
1 changed files with 12 additions and 9 deletions
13
mjit.c
13
mjit.c
|
@ -422,16 +422,19 @@ init_header_filename(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#ifndef LOAD_RELATIVE
|
#ifndef LOAD_RELATIVE
|
||||||
if ((basedir == build_dir) &&
|
if (basedir == build_dir) {
|
||||||
(fstat(fd, &st) ||
|
memset(&st, 0, sizeof(st));
|
||||||
st.st_uid != getuid() ||
|
if (fstat(fd, &st) ||
|
||||||
(st.st_mode & 022))) {
|
(st.st_uid != getuid()) ||
|
||||||
|
(st.st_mode & 022)) {
|
||||||
(void)close(fd);
|
(void)close(fd);
|
||||||
verbose(1, "Unsafe header file: %s", header_file);
|
verbose(1, "Unsafe header file: uid=%ld mode=%#o %s",
|
||||||
|
(long)st.st_uid, (unsigned)st.st_mode, header_file);
|
||||||
xfree(header_file);
|
xfree(header_file);
|
||||||
header_file = NULL;
|
header_file = NULL;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
(void)close(fd);
|
(void)close(fd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue