* 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.
This commit is contained in:
Corinna Vinschen 2000-12-19 19:52:57 +00:00
parent 4f95585070
commit 5827f4d98a
7 changed files with 25 additions and 4 deletions

View 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

View 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}}},

View 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 ())

View 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);

View 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},

View 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.

View 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