Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Chris January" To: "Cygwin AT Cygwin DOT Com" Subject: problem with chroot causing Cygwin to get confused about the root directory Date: Sun, 1 Dec 2002 17:44:56 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 I'm having a problem with chroot - see the following strace: CYGWIN_NT-5.1 AVOCADO 1.3.17(0.67/3/2) 2002-11-27 18:54 i686 unknown 63 60329 [main] linexec 2652 normalize_posix_path: src . 61 60390 [main] linexec 2652 cwdstuff::get: posix /home/chris/line/rootfs 55 60445 [main] linexec 2652 cwdstuff::get: (/home/chris/line/rootfs) = cwdstuff::get (0x22F880, 260, 1, 0), errno 9 57 60502 [main] linexec 2652 normalize_posix_path: /home/chris/line/rootfs = normalize_posix_path (.) 58 60560 [main] linexec 2652 mount_info::conv_to_win32_path: conv_to_win32_path (/home/chris/line/rootfs) 69 60629 [main] linexec 2652 set_flags: flags: binary (0x2) 74 60703 [main] linexec 2652 mount_info::conv_to_win32_path: src_path /home/chris/line/rootfs, dst C:\cygwin\home\chris\line\rootfs, flags 0xA, rc 0 731 61434 [main] linexec 2652 symlink_info::check: not a symlink 115 61549 [main] linexec 2652 symlink_info::check: 0 = symlink.check (C:\cygwin\home\chris\line\rootfs, 0x22F540) (0xA) 63 61612 [main] linexec 2652 mount_info::conv_to_win32_path: conv_to_win32_path (/home/chris/line) 65 61677 [main] linexec 2652 set_flags: flags: binary (0x2) 55 61732 [main] linexec 2652 mount_info::conv_to_win32_path: src_path /home/chris/line, dst C:\cygwin\home\chris\line, flags 0xA, rc 0 301 62033 [main] linexec 2652 symlink_info::check: not a symlink 77 62110 [main] linexec 2652 symlink_info::check: 0 = symlink.check (C:\cygwin\home\chris\line, 0x22F540) (0xA) 61 62171 [main] linexec 2652 mount_info::conv_to_win32_path: conv_to_win32_path (/home/chris) 62 62233 [main] linexec 2652 set_flags: flags: binary (0x2) 56 62289 [main] linexec 2652 mount_info::conv_to_win32_path: src_path /home/chris, dst C:\cygwin\home\chris, flags 0xA, rc 0 271 62560 [main] linexec 2652 symlink_info::check: not a symlink 75 62635 [main] linexec 2652 symlink_info::check: 0 = symlink.check (C:\cygwin\home\chris, 0x22F540) (0xA) 60 62695 [main] linexec 2652 mount_info::conv_to_win32_path: conv_to_win32_path (/home) 62 62757 [main] linexec 2652 set_flags: flags: binary (0x2) 56 62813 [main] linexec 2652 mount_info::conv_to_win32_path: src_path /home, dst C:\cygwin\home, flags 0xA, rc 0 836 63649 [main] linexec 2652 symlink_info::check: not a symlink 152 63801 [main] linexec 2652 symlink_info::check: 0 = symlink.check (C:\cygwin\home, 0x22F540) (0xA) 69 63870 [main] linexec 2652 path_conv::check: root_dir(C:\), this->path(C:\cygwin\home\chris\line\rootfs), set_has_acls(8) 65 63935 [main] linexec 2652 chroot: 0 = chroot (.) 65 64000 [main] linexec 2652 chdir: dir '/' 57 64057 [main] linexec 2652 normalize_posix_path: src / 57 64114 [main] linexec 2652 normalize_posix_path: / = normalize_posix_path (/) 56 64170 [main] linexec 2652 mount_info::conv_to_win32_path: conv_to_win32_path (/) 66 64236 [main] linexec 2652 set_flags: flags: binary (0x2) 55 64291 [main] linexec 2652 mount_info::conv_to_win32_path: src_path /, dst C:\cygwin\home\chris\line\rootfs, flags 0xA, rc 0 554 64845 [main] linexec 2652 symlink_info::check: not a symlink 96 64941 [main] linexec 2652 symlink_info::check: 0 = symlink.check (C:\cygwin\home\chris\line\rootfs, 0x22F520) (0xA) 62 65003 [main] linexec 2652 path_conv::check: root_dir(C:\), this->path(C:\cygwin\home\chris\line\rootfs), set_has_acls(8) 71 65074 [main] linexec 2652 mount_info::conv_to_posix_path: conv_to_posix_path (C:\cygwin\home\chris\line\rootfs, no-keep-rel, no-add-slash) 63 65137 [main] linexec 2652 normalize_win32_path: C:\cygwin\home\chris\line\rootfs = normalize_win32_path (C:\cygwin\home\chris\line\rootfs) 66 65203 [main] linexec 2652 mount_info::conv_to_posix_path: /cygdrive/c/cygwin/home/chris/line/rootfs = conv_to_posix_path (C:\cygwin\home\chris\line\rootfs) 61 65264 [main] linexec 2652 chdir: 0 = chdir() cygheap->cwd.posix '/cygdrive/c/cygwin/home/chris/line/rootfs' native 'C:\cygwin\home\chris\line\rootfs' At the start of the strace chroot (".") has been called; it succeeds at time 63935. (The same problem occurs with chroot() as well). Then chdir ("/") is called at time 64000. The result of conv_to_posix_path at time 2652 should be '/', but is instead /cygdrive/c/... I'll look at the Cygwin source, but has anyone else any ideas as I suspect it may take me some time to track this down. Chris -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/