[PATCH]: Use the user supplied cygdrive prefix
Pavel Tsekov
ptsekov@gmx.net
Sun Mar 6 20:53:00 GMT 2005
Hello,
with the latest release (1.5.13-1) I have trouble accessing drives via a
prefix other than /cygdrive. It seems that this was introduced by the
following change:
2004-10-28 Pierre Humblet <pierre.humblet@ieee.org>
* path.cc (mount_info::from_registry): Deimpersonate while
accessing HKLM.
(mount_info::read_cygdrive_info_from_registry): Ditto.
* cygheap.h: Define NO_IMPERSONATION.
(cygheap_user::issetuid): Replace INVALID_HANDLE_VALUE by
NO_IMPERSONATION.
(cygheap_user::has_impersonation_tokens): Ditto.
(cygheap_user::close_impersonation_tokens): Ditto.
* uinfo.cc (uinfo_init): Ditto.
* syscalls.cc (seteuid32): Ditto.
* security.cc (set_impersonation_token): Ditto.
Here is how the system behaves without the patch:
Administrator@mordor ~
$ mount
C:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system
(binmode)
C:\cygwin\usr\share\mc\extfs on /usr/share/mc/extfs type system
(binmode,cygexec)
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type system (binmode,noumount)
Administrator@mordor ~
$ mount -p
Prefix Type Flags
/mnt user binmode
/cygdrive system binmode
Administrator@mordor ~
$ cd /mnt/c
bash: cd: /mnt/c: No such file or directory
Administrator@mordor ~
$
and with the patch:
Administrator@mordor ~
$ mount
C:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system
(binmode)
C:\cygwin\usr\share\mc\extfs on /usr/share/mc/extfs type system
(binmode,cygexec)
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /mnt/c type user (binmode,noumount)
Administrator@mordor ~
$ mount -p
Prefix Type Flags
/mnt user binmode
/cygdrive system binmode
Administrator@mordor ~
$ cd /mnt/c
Administrator@mordor /mnt/c
$
Here is the changelog entry:
2005-03-06 Pavel Tsekov <ptsekov@gmx.net>
* path.cc (mount_info::read_cygdrive_info_from_registry):
Use the user prefix if it exists.
-------------- next part --------------
Index: path.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
retrieving revision 1.351
diff -u -p -r1.351 path.cc
--- path.cc 6 Mar 2005 20:15:07 -0000 1.351
+++ path.cc 6 Mar 2005 20:51:24 -0000
@@ -1956,6 +1956,7 @@ mount_info::read_cygdrive_info_from_regi
cygdrive_flags |= MOUNT_SYSTEM;
slashify (cygdrive, cygdrive, 1);
cygdrive_len = strlen (cygdrive);
+ break;
}
}
More information about the Cygwin-patches
mailing list