* dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote shares.

* path.cc (mount_info::conv_to_win32_path): Set flags to binary when mount
entry is not found.
(mount_info::set_flags_from_win32_path): Ditto.
This commit is contained in:
Christopher Faylor 2002-06-05 04:01:43 +00:00
parent 147d2ab494
commit ce006ffa7f
39 changed files with 60 additions and 62 deletions

View File

@ -1,6 +1,6 @@
/* threaded_queue.cc /* threaded_queue.cc
Copyright 2001 Red Hat Inc. Copyright 2001, 2002 Red Hat Inc.
Written by Robert Collins <rbtcollins@hotmail.com> Written by Robert Collins <rbtcollins@hotmail.com>

View File

@ -1,3 +1,11 @@
2002-06-04 Christopher Faylor <cgf@redhat.com>
* dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote
shares.
* path.cc (mount_info::conv_to_win32_path): Set flags to binary when
mount entry is not found.
(mount_info::set_flags_from_win32_path): Ditto.
2002-06-04 Christopher Faylor <cgf@redhat.com> 2002-06-04 Christopher Faylor <cgf@redhat.com>
* dtable.cc (handle_to_fn): Correct placement and length of name * dtable.cc (handle_to_fn): Correct placement and length of name

View File

@ -1,6 +1,6 @@
/* autoload.cc: all dynamic load stuff. /* autoload.cc: all dynamic load stuff.
Copyright 2000, 2001 Red Hat, Inc. Copyright 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* cygheap.cc: Cygwin heap manager. /* cygheap.cc: Cygwin heap manager.
Copyright 2000, 2001 Red Hat, Inc. Copyright 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* debug.cc /* debug.cc
Copyright 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for Cygwin license. Please consult the file "CYGWIN_LICENSE" for

View File

@ -1,6 +1,6 @@
/* dll_init.cc /* dll_init.cc
Copyright 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for Cygwin license. Please consult the file "CYGWIN_LICENSE" for

View File

@ -718,6 +718,9 @@ handle_to_fn (HANDLE h, char *posix_fn)
#else #else
#define DEVICE_PREFIX "\\device\\" #define DEVICE_PREFIX "\\device\\"
#define DEVICE_PREFIX_LEN sizeof(DEVICE_PREFIX) - 1 #define DEVICE_PREFIX_LEN sizeof(DEVICE_PREFIX) - 1
#define REMOTE "\\Device\\LanmanRedirector\\"
#define REMOTE_LEN sizeof (REMOTE) - 1
static char * static char *
handle_to_fn (HANDLE h, char *posix_fn) handle_to_fn (HANDLE h, char *posix_fn)
{ {
@ -794,6 +797,13 @@ handle_to_fn (HANDLE h, char *posix_fn)
memcpy (w32, maxmatchdos, n); memcpy (w32, maxmatchdos, n);
w32[n] = '\\'; w32[n] = '\\';
} }
else if (strncasematch (w32, REMOTE, REMOTE_LEN))
{
w32 += REMOTE_LEN - 2;
*w32 = '\\';
debug_printf ("remote drive");
}
debug_printf ("derived path '%s'", w32); debug_printf ("derived path '%s'", w32);
cygwin_conv_to_full_posix_path (w32, posix_fn); cygwin_conv_to_full_posix_path (w32, posix_fn);

View File

@ -1,7 +1,7 @@
/* environ.cc: Cygwin-adopted functions from newlib to manipulate /* environ.cc: Cygwin-adopted functions from newlib to manipulate
process's environment. process's environment.
Copyright 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for Cygwin license. Please consult the file "CYGWIN_LICENSE" for

View File

@ -1,6 +1,6 @@
/* errno.cc: errno-related functions /* errno.cc: errno-related functions
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* exec.cc: exec system call support. /* exec.cc: exec system call support.
Copyright 1996, 1997, 1998, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* fcntl.cc: fcntl syscall /* fcntl.cc: fcntl syscall
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1021,16 +1021,6 @@ fhandler_base::fhandler_base (DWORD devtype, int unit):
win32_path_name (NULL), win32_path_name (NULL),
open_status (0) open_status (0)
{ {
#if 0
int bin = __fmode & O_TEXT ? 0 : 1;
if (status != FH_DISK && status != FH_CONSOLE)
{
if (!get_r_binset ())
set_r_binary (bin);
if (!get_w_binset ())
set_w_binary (bin);
}
#endif
} }
/* Normal I/O destructor */ /* Normal I/O destructor */

View File

@ -1,6 +1,6 @@
/* fhandler_console.cc /* fhandler_console.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.
@ -713,14 +713,6 @@ fhandler_console::tcflush (int queue)
int int
fhandler_console::output_tcsetattr (int, struct termios const *t) fhandler_console::output_tcsetattr (int, struct termios const *t)
{ {
/* Ignore the optional_actions stuff, since all output is emitted
instantly */
#if 0
/* Enable/disable LF -> CRLF conversions */
set_w_binary ((t->c_oflag & ONLCR) ? 0 : 1);
#endif
/* All the output bits we can ignore */ /* All the output bits we can ignore */
DWORD flags = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; DWORD flags = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT;
@ -743,8 +735,10 @@ fhandler_console::input_tcsetattr (int, struct termios const *t)
oflags = 0; oflags = 0;
DWORD flags = 0; DWORD flags = 0;
#if 0
/* Enable/disable LF -> CRLF conversions */ /* Enable/disable LF -> CRLF conversions */
set_r_binary ((t->c_iflag & INLCR) ? 0 : 1); set_r_binary ((t->c_iflag & INLCR) ? 0 : 1);
#endif
/* There's some disparity between what we need and what's /* There's some disparity between what we need and what's
available. We've got ECHO and ICANON, they've available. We've got ECHO and ICANON, they've
@ -819,13 +813,6 @@ fhandler_console::tcgetattr (struct termios *t)
t->c_cflag |= CS8; t->c_cflag |= CS8;
#if 0
if (!get_r_binary ())
t->c_iflag |= IGNCR;
if (!get_w_binary ())
t->c_oflag |= ONLCR;
#endif
DWORD flags; DWORD flags;
if (!GetConsoleMode (get_io_handle (), &flags)) if (!GetConsoleMode (get_io_handle (), &flags))

View File

@ -1,6 +1,6 @@
/* fhandler_raw.cc. See fhandler.h for a description of the fhandler classes. /* fhandler_raw.cc. See fhandler.h for a description of the fhandler classes.
Copyright 1999, 2000, 2001 Red Hat, Inc. Copyright 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* fhandler_serial.cc /* fhandler_serial.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* fhandler_termios.cc /* fhandler_termios.cc
Copyright 1999, 2000, 2001 Red Hat, Inc. Copyright 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* fhandler_tty.cc /* fhandler_tty.cc
Copyright 1997, 1998, 2000, 2001 Red Hat, Inc. Copyright 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* fhandler_windows.cc: code to access windows message queues. /* fhandler_windows.cc: code to access windows message queues.
Copyright 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
Written by Sergey S. Okhapkin (sos@prospect.com.ru). Written by Sergey S. Okhapkin (sos@prospect.com.ru).
Feedback and testing by Andy Piper (andyp@parallax.co.uk). Feedback and testing by Andy Piper (andyp@parallax.co.uk).

View File

@ -1,6 +1,6 @@
/* fork.cc /* fork.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* heap.cc: Cygwin heap manager. /* heap.cc: Cygwin heap manager.
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* ipc.cc: Single unix specification IPC interface for Cygwin /* ipc.cc: Single unix specification IPC interface for Cygwin
Copyright 2001 Red Hat, Inc. Copyright 2001, 2002 Red Hat, Inc.
Originally written by Robert Collins <robert.collins@hotmail.com> Originally written by Robert Collins <robert.collins@hotmail.com>

View File

@ -1,6 +1,6 @@
/* malloc.cc /* malloc.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
Originally written by Steve Chamberlain of Cygnus Support Originally written by Steve Chamberlain of Cygnus Support
sac@cygnus.com sac@cygnus.com

View File

@ -1512,7 +1512,10 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst,
} }
if (i >= nmounts) if (i >= nmounts)
{
backslashify (pathbuf, dst, 0); /* just convert */ backslashify (pathbuf, dst, 0); /* just convert */
set_flags (flags, PATH_BINARY);
}
else else
{ {
int n; int n;
@ -1755,7 +1758,7 @@ mount_info::set_flags_from_win32_path (const char *p)
if (path_prefix_p (mi.native_path, p, mi.native_pathlen)) if (path_prefix_p (mi.native_path, p, mi.native_pathlen))
return mi.flags; return mi.flags;
} }
return 0; return PATH_BINARY;
} }
/* read_mounts: Given a specific regkey, read mounts from under its /* read_mounts: Given a specific regkey, read mounts from under its

View File

@ -1,6 +1,6 @@
/* poll.cc. Implements poll(2) via usage of select(2) call. /* poll.cc. Implements poll(2) via usage of select(2) call.
Copyright 2000, 2001 Red Hat, Inc. Copyright 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* registry.cc: registry interface /* registry.cc: registry interface
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* resource.cc: getrusage () and friends. /* resource.cc: getrusage () and friends.
Copyright 1996, 1997, 1998, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
Written by Steve Chamberlain (sac@cygnus.com), Doug Evans (dje@cygnus.com), Written by Steve Chamberlain (sac@cygnus.com), Doug Evans (dje@cygnus.com),
Geoffrey Noer (noer@cygnus.com) of Cygnus Support. Geoffrey Noer (noer@cygnus.com) of Cygnus Support.

View File

@ -1,6 +1,6 @@
/* shared.cc: shared data area support. /* shared.cc: shared data area support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* shm.cc: Single unix specification IPC interface for Cygwin /* shm.cc: Single unix specification IPC interface for Cygwin
Copyright 2001 Red Hat, Inc. Copyright 2001, 2002 Red Hat, Inc.
Originally written by Robert Collins <robert.collins@hotmail.com> Originally written by Robert Collins <robert.collins@hotmail.com>

View File

@ -1,6 +1,6 @@
/* strace.cc: system/windows tracing /* strace.cc: system/windows tracing
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -4,7 +4,7 @@
which is intended to operate similarly to a mutex but attempts to which is intended to operate similarly to a mutex but attempts to
avoid making expensive calls to the kernel. avoid making expensive calls to the kernel.
Copyright 2000, 2001 Red Hat, Inc. Copyright 2000, 2001, 2002 Red Hat, Inc.
Written by Christopher Faylor <cgf@cygnus.com> Written by Christopher Faylor <cgf@cygnus.com>

View File

@ -1,6 +1,6 @@
/* sysconf.cc /* sysconf.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* termios.cc: termios for WIN32. /* termios.cc: termios for WIN32.
Copyright 1996, 1997, 1998, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
Written by Doug Evans and Steve Chamberlain of Cygnus Support Written by Doug Evans and Steve Chamberlain of Cygnus Support
dje@cygnus.com, sac@cygnus.com dje@cygnus.com, sac@cygnus.com

View File

@ -1,6 +1,6 @@
/* thread.cc: Locking and threading module functions /* thread.cc: Locking and threading module functions
Copyright 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
Originally written by Marco Fuykschot <marco@ddi.nl> Originally written by Marco Fuykschot <marco@ddi.nl>
Substantialy enhanced by Robert Collins <rbtcollins@hotmail.com> Substantialy enhanced by Robert Collins <rbtcollins@hotmail.com>

View File

@ -1,6 +1,6 @@
/* threaded_queue.cc /* threaded_queue.cc
Copyright 2001 Red Hat Inc. Copyright 2001, 2002 Red Hat Inc.
Written by Robert Collins <rbtcollins@hotmail.com> Written by Robert Collins <rbtcollins@hotmail.com>

View File

@ -1,6 +1,6 @@
/* tty.cc /* tty.cc
Copyright 1997, 1998, 2000, 2001 Red Hat, Inc. Copyright 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* uname.cc /* uname.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com
Rewritten by Geoffrey Noer of Cygnus Solutions, noer@cygnus.com Rewritten by Geoffrey Noer of Cygnus Solutions, noer@cygnus.com

View File

@ -1,6 +1,6 @@
/* wait.cc: Posix wait routines. /* wait.cc: Posix wait routines.
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,7 +1,7 @@
/* wincap.cc -- figure out on which OS we're running. Set the /* wincap.cc -- figure out on which OS we're running. Set the
capability class to the appropriate values. capability class to the appropriate values.
Copyright 2001 Red Hat, Inc. Copyright 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.

View File

@ -1,6 +1,6 @@
/* window.cc: hidden windows for signals/itimer support /* window.cc: hidden windows for signals/itimer support
Copyright 1997, 1998, 2000, 2001 Red Hat, Inc. Copyright 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
Written by Sergey Okhapkin <sos@prospect.com.ru> Written by Sergey Okhapkin <sos@prospect.com.ru>