OSDN Git Service

* dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote shares.
authorcgf <cgf>
Wed, 5 Jun 2002 04:01:41 +0000 (04:01 +0000)
committercgf <cgf>
Wed, 5 Jun 2002 04:01:41 +0000 (04:01 +0000)
* 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.

39 files changed:
winsup/cygserver/threaded_queue.cc
winsup/cygwin/ChangeLog
winsup/cygwin/autoload.cc
winsup/cygwin/cygheap.cc
winsup/cygwin/debug.cc
winsup/cygwin/dll_init.cc
winsup/cygwin/dtable.cc
winsup/cygwin/environ.cc
winsup/cygwin/errno.cc
winsup/cygwin/exec.cc
winsup/cygwin/fcntl.cc
winsup/cygwin/fhandler.cc
winsup/cygwin/fhandler_console.cc
winsup/cygwin/fhandler_raw.cc
winsup/cygwin/fhandler_serial.cc
winsup/cygwin/fhandler_termios.cc
winsup/cygwin/fhandler_tty.cc
winsup/cygwin/fhandler_windows.cc
winsup/cygwin/fork.cc
winsup/cygwin/heap.cc
winsup/cygwin/ipc.cc
winsup/cygwin/malloc_wrapper.cc
winsup/cygwin/path.cc
winsup/cygwin/poll.cc
winsup/cygwin/registry.cc
winsup/cygwin/resource.cc
winsup/cygwin/shared.cc
winsup/cygwin/shm.cc
winsup/cygwin/strace.cc
winsup/cygwin/sync.cc
winsup/cygwin/sysconf.cc
winsup/cygwin/termios.cc
winsup/cygwin/thread.cc
winsup/cygwin/threaded_queue.cc
winsup/cygwin/tty.cc
winsup/cygwin/uname.cc
winsup/cygwin/wait.cc
winsup/cygwin/wincap.cc
winsup/cygwin/window.cc

index cb8e3f6..321fa16 100644 (file)
@@ -1,6 +1,6 @@
 /* threaded_queue.cc
 
-   Copyright 2001 Red Hat Inc.
+   Copyright 2001, 2002 Red Hat Inc.
 
    Written by Robert Collins <rbtcollins@hotmail.com>
 
index d07cf25..d4722d5 100644 (file)
@@ -1,5 +1,13 @@
 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>
+
        * dtable.cc (handle_to_fn): Correct placement and length of name
        buffer. (Suggested by Pavel Tsekov)
 
index 074a684..9af5aea 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 2e3637b..d6ce676 100644 (file)
@@ -1,6 +1,6 @@
 /* cygheap.cc: Cygwin heap manager.
 
-   Copyright 2000, 2001 Red Hat, Inc.
+   Copyright 2000, 2001, 2002 Red Hat, Inc.
 
    This file is part of Cygwin.
 
index abb4457..5d3d63b 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
 Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
index 8d5f34c..5a5b165 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
 Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
index e2821db..62c9609 100644 (file)
@@ -718,6 +718,9 @@ handle_to_fn (HANDLE h, char *posix_fn)
 #else
 #define DEVICE_PREFIX "\\device\\"
 #define DEVICE_PREFIX_LEN sizeof(DEVICE_PREFIX) - 1
+#define REMOTE "\\Device\\LanmanRedirector\\"
+#define REMOTE_LEN sizeof (REMOTE) - 1
+
 static char *
 handle_to_fn (HANDLE h, char *posix_fn)
 {
@@ -794,6 +797,13 @@ handle_to_fn (HANDLE h, char *posix_fn)
       memcpy (w32, maxmatchdos, 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);
   cygwin_conv_to_full_posix_path (w32, posix_fn);
index 16922e2..8b15c1c 100644 (file)
@@ -1,7 +1,7 @@
 /* environ.cc: Cygwin-adopted functions from newlib to manipulate
    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
 Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
index fc9a455..3ad7b3d 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 1a3aebf..12f75fd 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index f0479e6..0ba7049 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 67fe64f..b3fa13c 100644 (file)
@@ -1021,16 +1021,6 @@ fhandler_base::fhandler_base (DWORD devtype, int unit):
   win32_path_name (NULL),
   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 */
index f7d1f37..cc948d3 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
@@ -713,14 +713,6 @@ fhandler_console::tcflush (int queue)
 int
 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 */
 
   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;
   DWORD flags = 0;
 
+#if 0
   /* Enable/disable LF -> CRLF conversions */
   set_r_binary ((t->c_iflag & INLCR) ? 0 : 1);
+#endif
 
   /* There's some disparity between what we need and what's
      available.  We've got ECHO and ICANON, they've
@@ -819,13 +813,6 @@ fhandler_console::tcgetattr (struct termios *t)
 
   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;
 
   if (!GetConsoleMode (get_io_handle (), &flags))
index 8ad822c..c692214 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 81077b3..e63de26 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index b3cd735..778c096 100644 (file)
@@ -1,6 +1,6 @@
 /* fhandler_termios.cc
 
-   Copyright 1999, 2000, 2001 Red Hat, Inc.
+   Copyright 1999, 2000, 2001, 2002 Red Hat, Inc.
 
 This file is part of Cygwin.
 
index 03af0e7..758d6ea 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index ddff3f9..591f2c7 100644 (file)
@@ -1,6 +1,6 @@
 /* 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).
    Feedback and testing by Andy Piper (andyp@parallax.co.uk).
index 2bb8eb5..ff464f0 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index eebcd92..5c301cc 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 333eca5..1f496d3 100644 (file)
@@ -1,6 +1,6 @@
 /* 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>
 
index 054d77b..ee039f3 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
    sac@cygnus.com
index 3d30797..25412b2 100644 (file)
@@ -1512,7 +1512,10 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst,
     }
 
   if (i >= nmounts)
-    backslashify (pathbuf, dst, 0);    /* just convert */
+    {
+      backslashify (pathbuf, dst, 0);  /* just convert */
+      set_flags (flags, PATH_BINARY);
+    }
   else
     {
       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))
        return mi.flags;
     }
-  return 0;
+  return PATH_BINARY;
 }
 
 /* read_mounts: Given a specific regkey, read mounts from under its
index 6305605..a1c50e8 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 4d2bb2b..22fa511 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index bc87127..8d98871 100644 (file)
@@ -1,6 +1,6 @@
 /* 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),
    Geoffrey Noer (noer@cygnus.com) of Cygnus Support.
index 2e383ec..2a53682 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 647c55d..6026b20 100644 (file)
@@ -1,6 +1,6 @@
 /* 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>
 
index a38e2dc..64a9cbc 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 333ec19..b6dec83 100644 (file)
@@ -4,7 +4,7 @@
    which is intended to operate similarly to a mutex but attempts to
    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>
 
index 1f2608d..67099c2 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 499072f..c44ccbd 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
    dje@cygnus.com, sac@cygnus.com
index 42bffe6..c0cd26c 100644 (file)
@@ -1,6 +1,6 @@
 /* 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>
    Substantialy enhanced by Robert Collins <rbtcollins@hotmail.com>
index cb8e3f6..321fa16 100755 (executable)
@@ -1,6 +1,6 @@
 /* threaded_queue.cc
 
-   Copyright 2001 Red Hat Inc.
+   Copyright 2001, 2002 Red Hat Inc.
 
    Written by Robert Collins <rbtcollins@hotmail.com>
 
index f5143b2..418b816 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index 740c16a..de7b900 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
    Rewritten by Geoffrey Noer of Cygnus Solutions, noer@cygnus.com
 
index d6e5bf7..d9588e8 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
index e765c15..2aede9e 100644 (file)
@@ -1,7 +1,7 @@
 /* wincap.cc -- figure out on which OS we're running. Set the
                capability class to the appropriate values.
 
-   Copyright 2001 Red Hat, Inc.
+   Copyright 2001, 2002 Red Hat, Inc.
 
 This file is part of Cygwin.
 
index 80f0f4b..38b19c4 100644 (file)
@@ -1,6 +1,6 @@
 /* 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>