diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 03fcb33c6..6ef1efe3f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2004-08-21 Corinna Vinschen + + * environ.cc (set_ntea): New function. + (set_ntsec): Ditto. + (set_smbntsec): Ditto. + (parse_thing): Change ntea, ntsec and smbntsec settings to call + appropriate functions. + 2004-08-20 Corinna Vinschen * fhandler_tape.cc (fhandler_dev_tape::raw_read): Use ?: instead of diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 6fac0994b..6bd5f2f68 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -482,6 +482,24 @@ set_chunksize (const char *buf) wincap.set_chunksize (strtol (buf, NULL, 0)); } +static void +set_ntea (const char *buf) +{ + allow_ntea = (buf && strcasematch (buf, "yes") && wincap.has_security ()); +} + +static void +set_ntsec (const char *buf) +{ + allow_ntsec = (buf && strcasematch (buf, "yes") && wincap.has_security ()); +} + +static void +set_smbntsec (const char *buf) +{ + allow_smbntsec = (buf && strcasematch (buf, "yes") && wincap.has_security ()); +} + /* The structure below is used to set up an array which is used to parse the CYGWIN environment variable or, if enabled, options from the registry. */ @@ -516,9 +534,9 @@ static struct parse_thing {"export", {&export_settings}, justset, NULL, {{false}, {true}}}, {"forkchunk", {func: set_chunksize}, isfunc, NULL, {{0}, {0}}}, {"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}}}, + {"ntea", {func: set_ntea}, isfunc, NULL, {{0}, {s: "yes"}}}, + {"ntsec", {func: set_ntsec}, isfunc, NULL, {{0}, {s: "yes"}}}, + {"smbntsec", {func: set_smbntsec}, isfunc, NULL, {{0}, {s: "yes"}}}, {"reset_com", {&reset_com}, justset, NULL, {{false}, {true}}}, {"strip_title", {&strip_title_path}, justset, NULL, {{false}, {true}}}, {"subauth_id", {func: &subauth_id_init}, isfunc, NULL, {{0}, {0}}},