diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-07-20 00:14:24 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-07-20 00:14:24 +0400 |
commit | a67f4165aeafc5bb3790f1c459c1c5590d4a6869 (patch) | |
tree | 2ae928c40b9a36e919dd78911caf0d13e8577fed /winsup/cygwin/dir.cc | |
parent | 7a2fc2a4155447cfa4554ddf9946c0fb00010d01 (diff) |
* shared.h (class pinfo): New members `root' and `rootlen'.
* syscalls.cc (chroot): Set new root for process.
* path.cc (getcwd_inner): Add parameter to force use of
new root from chroot() call.
(ischrootpath): New macro.
(normalize_posix_path): Care for changed root dir.
(normalize_win32_path): Ditto.
(getcwd_inner): Ditto.
(chdir): Eliminate trailing path component consisting
entirely of dots.
* fork.cc (fork): Copy pinfo members regarding chroot().
* spawn.cc (_spawnve): Ditto.
* dir.cc (opendir): Don't use computed win32 path if
chroot() took place.
Diffstat (limited to 'winsup/cygwin/dir.cc')
-rw-r--r-- | winsup/cygwin/dir.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 1b409060e..7323cb388 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -67,7 +67,8 @@ opendir (const char *dirname) goto failed; } - if (stat (real_dirname.get_win32 (), &statbuf) == -1) + if (stat (myself->rootlen ? dirname : real_dirname.get_win32 (), + &statbuf) == -1) goto failed; if (!(statbuf.st_mode & S_IFDIR)) |