diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-12-19 19:52:57 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-12-19 19:52:57 +0000 |
commit | 5827f4d98ae9e6f32ed2e20ef647ea0b489ee330 (patch) | |
tree | a344c9360ed8f1dc9d4ecfd97c8b35dc4ab6a44d /winsup | |
parent | 4f9558507059ed3b99bcd13819ee228fab751514 (diff) | |
download | newlib-5827f4d98ae9e6f32ed2e20ef647ea0b489ee330.zip newlib-5827f4d98ae9e6f32ed2e20ef647ea0b489ee330.tar.gz newlib-5827f4d98ae9e6f32ed2e20ef647ea0b489ee330.tar.bz2 |
* 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.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 12 | ||||
-rw-r--r-- | winsup/cygwin/environ.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/fhandler.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 7 | ||||
-rw-r--r-- | winsup/cygwin/security.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/security.h | 1 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 2 |
7 files changed, 25 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index cf2f6a3..d0dfabf 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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 diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 615ce17..09d8195 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -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}}}, diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index d2480df..f677961 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -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 ()) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 69f6071..d86f194 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -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); diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 0491578..67caf68 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -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}, diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h index b6397fe..bd1b3d8 100644 --- a/winsup/cygwin/security.h +++ b/winsup/cygwin/security.h @@ -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. diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index d63ab9b..103181a 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -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 |