From 746dddd01f28dc4499825c855c42aa5e95d5055a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 27 Oct 2022 20:42:09 -0700 Subject: listener: drop security checks on windows. These checks go off on Windows and are likely not easily fixable. They have to do with how Cygwin maps permissions. Our security checks depend on a detailed, bona fide Unix implementation. * parser.c (report_file_perm_problem, report_path_perm_problem): Empty bodies when compiled for Cygwin. (repl): Initialize the ppriv_s and psafe_s variables to the tf symbol, the function which takes any number of arguments, ignoring them, and returning t. --- parser.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index 8fd05785..d2c01048 100644 --- a/parser.c +++ b/parser.c @@ -941,16 +941,24 @@ val txr_parse(val source_in, val error_stream, static void report_file_perm_problem(val name) { +#ifdef __CYGWIN__ + (void) name; +#else format(std_output, lit("** security problem: ~a is readable by others\n"), name, nao); +#endif } static void report_path_perm_problem(val name) { +#ifdef __CYGWIN__ + (void) name; +#else format(std_output, lit("** security problem: a component of ~a is writable to others\n"), name, nao); +#endif } static void load_rcfile(val name, val psafe_s, val ppriv_s) @@ -1561,8 +1569,13 @@ val repl(val bindings, val in_stream, val out_stream, val env) val var_counter_sym = intern(lit("*v"), user_package); val result_hash_sym = intern(lit("*r"), user_package); val pexist_s = intern(lit("path-exists-p"), user_package); - val ppriv_s = intern(lit("path-strictly-private-to-me-p"), user_package); +#ifdef __CYGWIN__ + val ppriv_s = intern(lit("tf"), user_package); + val psafe_s = ppriv_s; +#else + val ppriv_s = intern(lit("path-strictly-private-to-me-p"), user_package); val psafe_s = intern(lit("path-components-safe"), user_package); +#endif val result_hash = make_hash(hash_weak_none, nil); val done = nil; val counter = one; -- cgit v1.2.3