OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains3x.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8f59a7
)
* syscalls.cc (chroot): Disallow chroot into special directories.
author
corinna
<corinna>
Thu, 2 Mar 2006 18:08:08 +0000
(18:08 +0000)
committer
corinna
<corinna>
Thu, 2 Mar 2006 18:08:08 +0000
(18:08 +0000)
Return EPERM instead.
winsup/cygwin/ChangeLog
patch
|
blob
|
history
winsup/cygwin/syscalls.cc
patch
|
blob
|
history
diff --git
a/winsup/cygwin/ChangeLog
b/winsup/cygwin/ChangeLog
index
8c2e24d
..
1c2506d
100644
(file)
--- a/
winsup/cygwin/ChangeLog
+++ b/
winsup/cygwin/ChangeLog
@@
-1,5
+1,10
@@
2006-03-02 Corinna Vinschen <corinna@vinschen.de>
+ * syscalls.cc (chroot): Disallow chroot into special directories.
+ Return EPERM instead.
+
+2006-03-02 Corinna Vinschen <corinna@vinschen.de>
+
* fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
cygdrive string length for those who have cygdrive mapped to "/".
diff --git
a/winsup/cygwin/syscalls.cc
b/winsup/cygwin/syscalls.cc
index
66c5e38
..
33eef64
100644
(file)
--- a/
winsup/cygwin/syscalls.cc
+++ b/
winsup/cygwin/syscalls.cc
@@
-2359,6
+2359,8
@@
chroot (const char *newroot)
set_errno (ENOENT);
else if (!path.isdir ())
set_errno (ENOTDIR);
+ else if (path.isspecial ())
+ set_errno (EPERM);
else
{
getwinenv("PATH="); /* Save the native PATH */