OSDN Git Service

* environ.cc (struct parse_thing): Add entry for new CYGWIN option
authorcorinna <corinna>
Tue, 19 Dec 2000 19:52:57 +0000 (19:52 +0000)
committercorinna <corinna>
Tue, 19 Dec 2000 19:52:57 +0000 (19:52 +0000)
        `smbntsec'.
        * path.cc (path_conv::check): Check path for being a remote path.
        If so and `allow_smbntsec' is set to FALSE, set has_acls to FALSE.
        * security.cc: Add global definition for `allow_smbntsec'.
        * security.h: Add extern declaration for `allow_smbntsec'.
        * fhandler.cc (fhandler_disk_file::open): Eliminate extern declaration
        of `allow_ntsec'.
        * syscalls.cc: Ditto.

winsup/cygwin/ChangeLog
winsup/cygwin/environ.cc
winsup/cygwin/fhandler.cc
winsup/cygwin/path.cc
winsup/cygwin/security.cc
winsup/cygwin/security.h
winsup/cygwin/syscalls.cc

index cf2f6a3..d0dfabf 100644 (file)
@@ -1,3 +1,15 @@
+Tue Dec 19 16:26:00 2000  Corinna Vinschen <corinna@vinschen.de>
+
+       * environ.cc (struct parse_thing): Add entry for new CYGWIN option
+       `smbntsec'.
+       * path.cc (path_conv::check): Check path for being a remote path.
+       If so and `allow_smbntsec' is set to FALSE, set has_acls to FALSE.
+       * security.cc: Add global definition for `allow_smbntsec'.
+       * security.h: Add extern declaration for `allow_smbntsec'.
+       * fhandler.cc (fhandler_disk_file::open): Eliminate extern declaration
+       of `allow_ntsec'.
+       * syscalls.cc: Ditto.
+
 Fri Dec 15 18:54:42 2000 Bradley A. Town <townba@pobox.com>
 
        * fhandler_console.cc (read): Add support for xterm-style mouse event
index 615ce17..09d8195 100644 (file)
@@ -29,6 +29,7 @@ details. */
 extern BOOL allow_glob;
 extern BOOL ignore_case_with_glob;
 extern BOOL allow_ntea;
+extern BOOL allow_smbntsec;
 extern BOOL strip_title_path;
 extern DWORD chunksize;
 BOOL reset_com = TRUE;
@@ -424,6 +425,7 @@ struct parse_thing
   {"glob", {func: &glob_init}, isfunc, NULL, {{0}, {s: "normal"}}},
   {"ntea", {&allow_ntea}, justset, NULL, {{FALSE}, {TRUE}}},
   {"ntsec", {&allow_ntsec}, justset, NULL, {{FALSE}, {TRUE}}},
+  {"smbntsec", {&allow_smbntsec}, justset, NULL, {{FALSE}, {TRUE}}},
   {"reset_com", {&reset_com}, justset, NULL, {{FALSE}, {TRUE}}},
   {"strip_title", {&strip_title_path}, justset, NULL, {{FALSE}, {TRUE}}},
   {"title", {&display_title}, justset, NULL, {{FALSE}, {TRUE}}},
index d2480df..f677961 100644 (file)
@@ -1254,7 +1254,6 @@ fhandler_disk_file::open (path_conv& real_path, int flags, mode_t mode)
     }
 
   extern BOOL allow_ntea;
-  extern BOOL allow_ntsec;
 
   if (!real_path.isexec () && !allow_ntea
       && (!allow_ntsec || !real_path.has_acls ())
index 69f6071..d86f194 100644 (file)
@@ -405,7 +405,12 @@ out:
     {
       debug_printf ("GetVolumeInformation(%s) = OK, full_path(%s), set_has_acls(%d)",
                    tmp_buf, full_path, volflags & FS_PERSISTENT_ACLS);
-      set_has_acls (volflags & FS_PERSISTENT_ACLS);
+      if (!allow_smbntsec
+          && ((tmp_buf[0] == '\\' && tmp_buf[1] == '\\')
+              || GetDriveType (tmp_buf) == DRIVE_REMOTE))
+        set_has_acls (FALSE);
+      else
+        set_has_acls (volflags & FS_PERSISTENT_ACLS);
       /* Known file systems with buggy open calls. Further explanation
          in fhandler.cc (fhandler_disk_file::open). */
       set_has_buggy_open (strcmp (fs_name, "SUNWNFS") == 0);
index 0491578..67caf68 100644 (file)
@@ -36,6 +36,10 @@ details. */
 
 extern BOOL allow_ntea;
 BOOL allow_ntsec = FALSE;
+/* allow_smbntsec is handled exclusively in path.cc (path_conv::check).
+   It's defined here because of it's strong relationship to allow_ntsec.
+   The default is TRUE to reflect the old behaviour. */
+BOOL allow_smbntsec = TRUE;
 
 SID_IDENTIFIER_AUTHORITY sid_auth[] = {
        {SECURITY_NULL_SID_AUTHORITY},
index b6397fe..bd1b3d8 100644 (file)
@@ -15,6 +15,7 @@ int __stdcall get_file_attribute (int, const char *, int *,
 int __stdcall set_file_attribute (int, const char *, int);
 int __stdcall set_file_attribute (int, const char *, uid_t, gid_t, int, const char *);
 extern BOOL allow_ntsec;
+extern BOOL allow_smbntsec;
 
 /* `lookup_name' should be called instead of LookupAccountName.
  * logsrv may be NULL, in this case only the local system is used for lookup.
index d63ab9b..103181a 100644 (file)
@@ -38,8 +38,6 @@ details. */
 #include "security.h"
 #include "cygheap.h"
 
-extern BOOL allow_ntsec;
-
 /* Close all files and process any queued deletions.
    Lots of unix style applications will open a tmp file, unlink it,
    but never call close.  This function is called by _exit to