diff options
-rw-r--r-- | CHANGES.md | 3 | ||||
-rw-r--r-- | config-scripts/cups-scripting.m4 | 91 | ||||
-rw-r--r-- | config.h.in | 14 | ||||
-rwxr-xr-x | configure | 320 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | scheduler/client.c | 111 | ||||
-rw-r--r-- | vcnet/config.h | 14 | ||||
-rw-r--r-- | xcode/config.h | 16 |
8 files changed, 2 insertions, 568 deletions
diff --git a/CHANGES.md b/CHANGES.md index 84d5d3e53..11a5d0f5d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,4 +6,5 @@ Changes in CUPS v2.3b1 ---------------------- - Fixed the ippserver sample code when threading is disabled or unavailable - (Issue #5154)
\ No newline at end of file + (Issue #5154) +- Dropped hard-coded CGI scripting language support (Issue #5124) diff --git a/config-scripts/cups-scripting.m4 b/config-scripts/cups-scripting.m4 deleted file mode 100644 index d2e1f294b..000000000 --- a/config-scripts/cups-scripting.m4 +++ /dev/null @@ -1,91 +0,0 @@ -dnl -dnl Scripting configuration stuff for CUPS. -dnl -dnl Copyright 2007-2017 by Apple Inc. -dnl Copyright 1997-2006 by Easy Software Products, all rights reserved. -dnl -dnl These coded instructions, statements, and computer programs are the -dnl property of Apple Inc. and are protected by Federal copyright -dnl law. Distribution and use rights are outlined in the file "LICENSE.txt" -dnl which should have been included with this file. If this file is -dnl missing or damaged, see the license at "http://www.cups.org/". -dnl - -dnl Do we have Java? -AC_ARG_WITH(java, [ --with-java set Java interpreter for web interfaces ], - CUPS_JAVA="$withval", - CUPS_JAVA="auto") - -if test "x$CUPS_JAVA" = xauto; then - AC_PATH_PROG(JAVA,java) - CUPS_JAVA="$JAVA" -elif test "x$CUPS_JAVA" = xno; then - CUPS_JAVA="" -fi - -AC_DEFINE_UNQUOTED(CUPS_JAVA, "$CUPS_JAVA") - -if test "x$CUPS_JAVA" != x; then - AC_DEFINE(HAVE_JAVA) -fi - -dnl Do we have Perl? -AC_ARG_WITH(perl, [ --with-perl set Perl interpreter for web interfaces ], - CUPS_PERL="$withval", - CUPS_PERL="auto") - -if test "x$CUPS_PERL" = xauto; then - AC_PATH_PROG(PERL,perl) - CUPS_PERL="$PERL" -elif test "x$CUPS_PERL" = xno; then - CUPS_PERL="" -fi - -AC_DEFINE_UNQUOTED(CUPS_PERL, "$CUPS_PERL") - -if test "x$CUPS_PERL" != x; then - AC_DEFINE(HAVE_PERL) -fi - -dnl Do we have PHP? -AC_ARG_WITH(php, [ --with-php set PHP interpreter for web interfaces ], - CUPS_PHP="$withval", - CUPS_PHP="auto") - -if test "x$CUPS_PHP" = xauto; then - AC_PATH_PROG(PHPCGI,php-cgi) - if test "x$PHPCGI" = x; then - AC_PATH_PROG(PHP,php) - CUPS_PHP="$PHP" - else - CUPS_PHP="$PHPCGI" - fi -elif test "x$CUPS_PHP" = xno; then - CUPS_PHP="" -fi - -AC_DEFINE_UNQUOTED(CUPS_PHP, "$CUPS_PHP") - -if test "x$CUPS_PHP" = x; then - CUPS_PHP="no" -else - AC_DEFINE(HAVE_PHP) -fi - -dnl Do we have Python? -AC_ARG_WITH(python, [ --with-python set Python interpreter for web interfaces ], - CUPS_PYTHON="$withval", - CUPS_PYTHON="auto") - -if test "x$CUPS_PYTHON" = xauto; then - AC_PATH_PROG(PYTHON,python) - CUPS_PYTHON="$PYTHON" -elif test "x$CUPS_PYTHON" = xno; then - CUPS_PYTHON="" -fi - -AC_DEFINE_UNQUOTED(CUPS_PYTHON, "$CUPS_PYTHON") - -if test "x$CUPS_PYTHON" != x; then - AC_DEFINE(HAVE_PYTHON) -fi diff --git a/config.h.in b/config.h.in index f3b5e4c7a..434c46c0c 100644 --- a/config.h.in +++ b/config.h.in @@ -502,20 +502,6 @@ /* - * Various scripting languages... - */ - -#undef HAVE_JAVA -#define CUPS_JAVA "/usr/bin/java" -#undef HAVE_PERL -#define CUPS_PERL "/usr/bin/perl" -#undef HAVE_PHP -#define CUPS_PHP "/usr/bin/php" -#undef HAVE_PYTHON -#define CUPS_PYTHON "/usr/bin/python" - - -/* * Do we have CoreFoundation public and private headers? */ @@ -606,11 +606,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS UNINSTALL_LANGUAGES INSTALL_LANGUAGES -PYTHON -PHP -PHPCGI -PERL -JAVA CUPS_WEBIF DEFAULT_IPP_PORT CUPS_SNMP_COMMUNITY @@ -905,10 +900,6 @@ with_snmp_address with_snmp_community with_ipp_port enable_webif -with_java -with_perl -with_php -with_python ' ac_precious_vars='build_alias host_alias @@ -1626,10 +1617,6 @@ Optional Packages: --with-snmp-address set SNMP query address, default=auto --with-snmp-community set SNMP community, default=public --with-ipp-port set port number for IPP, default=631 - --with-java set Java interpreter for web interfaces - --with-perl set Perl interpreter for web interfaces - --with-php set PHP interpreter for web interfaces - --with-python set Python interpreter for web interfaces Some influential environment variables: CC C compiler command @@ -10044,313 +10031,6 @@ _ACEOF - -# Check whether --with-java was given. -if test "${with_java+set}" = set; then : - withval=$with_java; CUPS_JAVA="$withval" -else - CUPS_JAVA="auto" -fi - - -if test "x$CUPS_JAVA" = xauto; then - # Extract the first word of "java", so it can be a program name with args. -set dummy java; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_JAVA+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $JAVA in - [\\/]* | ?:[\\/]*) - ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -JAVA=$ac_cv_path_JAVA -if test -n "$JAVA"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5 -$as_echo "$JAVA" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - CUPS_JAVA="$JAVA" -elif test "x$CUPS_JAVA" = xno; then - CUPS_JAVA="" -fi - -cat >>confdefs.h <<_ACEOF -#define CUPS_JAVA "$CUPS_JAVA" -_ACEOF - - -if test "x$CUPS_JAVA" != x; then - $as_echo "#define HAVE_JAVA 1" >>confdefs.h - -fi - - -# Check whether --with-perl was given. -if test "${with_perl+set}" = set; then : - withval=$with_perl; CUPS_PERL="$withval" -else - CUPS_PERL="auto" -fi - - -if test "x$CUPS_PERL" = xauto; then - # Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PERL in - [\\/]* | ?:[\\/]*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PERL=$ac_cv_path_PERL -if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - CUPS_PERL="$PERL" -elif test "x$CUPS_PERL" = xno; then - CUPS_PERL="" -fi - -cat >>confdefs.h <<_ACEOF -#define CUPS_PERL "$CUPS_PERL" -_ACEOF - - -if test "x$CUPS_PERL" != x; then - $as_echo "#define HAVE_PERL 1" >>confdefs.h - -fi - - -# Check whether --with-php was given. -if test "${with_php+set}" = set; then : - withval=$with_php; CUPS_PHP="$withval" -else - CUPS_PHP="auto" -fi - - -if test "x$CUPS_PHP" = xauto; then - # Extract the first word of "php-cgi", so it can be a program name with args. -set dummy php-cgi; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PHPCGI+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PHPCGI in - [\\/]* | ?:[\\/]*) - ac_cv_path_PHPCGI="$PHPCGI" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PHPCGI="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PHPCGI=$ac_cv_path_PHPCGI -if test -n "$PHPCGI"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHPCGI" >&5 -$as_echo "$PHPCGI" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$PHPCGI" = x; then - # Extract the first word of "php", so it can be a program name with args. -set dummy php; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PHP+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PHP in - [\\/]* | ?:[\\/]*) - ac_cv_path_PHP="$PHP" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PHP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PHP=$ac_cv_path_PHP -if test -n "$PHP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP" >&5 -$as_echo "$PHP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - CUPS_PHP="$PHP" - else - CUPS_PHP="$PHPCGI" - fi -elif test "x$CUPS_PHP" = xno; then - CUPS_PHP="" -fi - -cat >>confdefs.h <<_ACEOF -#define CUPS_PHP "$CUPS_PHP" -_ACEOF - - -if test "x$CUPS_PHP" = x; then - CUPS_PHP="no" -else - $as_echo "#define HAVE_PHP 1" >>confdefs.h - -fi - - -# Check whether --with-python was given. -if test "${with_python+set}" = set; then : - withval=$with_python; CUPS_PYTHON="$withval" -else - CUPS_PYTHON="auto" -fi - - -if test "x$CUPS_PYTHON" = xauto; then - # Extract the first word of "python", so it can be a program name with args. -set dummy python; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PYTHON+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - CUPS_PYTHON="$PYTHON" -elif test "x$CUPS_PYTHON" = xno; then - CUPS_PYTHON="" -fi - -cat >>confdefs.h <<_ACEOF -#define CUPS_PYTHON "$CUPS_PYTHON" -_ACEOF - - -if test "x$CUPS_PYTHON" != x; then - $as_echo "#define HAVE_PYTHON 1" >>confdefs.h - -fi - - INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" diff --git a/configure.ac b/configure.ac index 352c869a6..3f17d4633 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,6 @@ sinclude(config-scripts/cups-largefile.m4) sinclude(config-scripts/cups-dnssd.m4) sinclude(config-scripts/cups-startup.m4) sinclude(config-scripts/cups-defaults.m4) -sinclude(config-scripts/cups-scripting.m4) INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" diff --git a/scheduler/client.c b/scheduler/client.c index d628dc6c3..4d6604651 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -3115,45 +3115,6 @@ get_file(cupsd_client_t *con, /* I - Client connection */ strlcpy(ptr, "index.html", plen); status = lstat(filename, filestats); - -#ifdef HAVE_JAVA - if (status) - { - strlcpy(ptr, "index.class", plen); - status = lstat(filename, filestats); - } -#endif /* HAVE_JAVA */ - -#ifdef HAVE_PERL - if (status) - { - strlcpy(ptr, "index.pl", plen); - status = lstat(filename, filestats); - } -#endif /* HAVE_PERL */ - -#ifdef HAVE_PHP - if (status) - { - strlcpy(ptr, "index.php", plen); - status = lstat(filename, filestats); - } -#endif /* HAVE_PHP */ - -#ifdef HAVE_PYTHON - if (status) - { - strlcpy(ptr, "index.pyc", plen); - status = lstat(filename, filestats); - } - - if (status) - { - strlcpy(ptr, "index.py", plen); - status = lstat(filename, filestats); - } -#endif /* HAVE_PYTHON */ - } while (status && language[0]); @@ -3336,78 +3297,6 @@ is_cgi(cupsd_client_t *con, /* I - Client connection */ cupsdLogClient(con, CUPSD_LOG_DEBUG2, "is_cgi: filename=\"%s\", filestats=%p, type=%s/%s, returning 1.", filename, filestats, type->super, type->type); return (1); } -#ifdef HAVE_JAVA - else if (!_cups_strcasecmp(type->type, "x-httpd-java")) - { - /* - * "application/x-httpd-java" is a Java servlet. - */ - - cupsdSetString(&con->command, CUPS_JAVA); - - if (options) - cupsdSetStringf(&con->options, " %s %s", filename, options); - else - cupsdSetStringf(&con->options, " %s", filename); - - cupsdLogClient(con, CUPSD_LOG_DEBUG2, "is_cgi: filename=\"%s\", filestats=%p, type=%s/%s, returning 1.", filename, filestats, type->super, type->type); - return (1); - } -#endif /* HAVE_JAVA */ -#ifdef HAVE_PERL - else if (!_cups_strcasecmp(type->type, "x-httpd-perl")) - { - /* - * "application/x-httpd-perl" is a Perl page. - */ - - cupsdSetString(&con->command, CUPS_PERL); - - if (options) - cupsdSetStringf(&con->options, " %s %s", filename, options); - else - cupsdSetStringf(&con->options, " %s", filename); - - cupsdLogClient(con, CUPSD_LOG_DEBUG2, "is_cgi: filename=\"%s\", filestats=%p, type=%s/%s, returning 1.", filename, filestats, type->super, type->type); - return (1); - } -#endif /* HAVE_PERL */ -#ifdef HAVE_PHP - else if (!_cups_strcasecmp(type->type, "x-httpd-php")) - { - /* - * "application/x-httpd-php" is a PHP page. - */ - - cupsdSetString(&con->command, CUPS_PHP); - - if (options) - cupsdSetStringf(&con->options, " %s %s", filename, options); - else - cupsdSetStringf(&con->options, " %s", filename); - - cupsdLogClient(con, CUPSD_LOG_DEBUG2, "is_cgi: filename=\"%s\", filestats=%p, type=%s/%s, returning 1.", filename, filestats, type->super, type->type); - return (1); - } -#endif /* HAVE_PHP */ -#ifdef HAVE_PYTHON - else if (!_cups_strcasecmp(type->type, "x-httpd-python")) - { - /* - * "application/x-httpd-python" is a Python page. - */ - - cupsdSetString(&con->command, CUPS_PYTHON); - - if (options) - cupsdSetStringf(&con->options, " %s %s", filename, options); - else - cupsdSetStringf(&con->options, " %s", filename); - - cupsdLogClient(con, CUPSD_LOG_DEBUG2, "is_cgi: filename=\"%s\", filestats=%p, type=%s/%s, returning 1.", filename, filestats, type->super, type->type); - return (1); - } -#endif /* HAVE_PYTHON */ cupsdLogClient(con, CUPSD_LOG_DEBUG2, "is_cgi: filename=\"%s\", filestats=%p, type=%s/%s, returning 0.", filename, filestats, type->super, type->type); return (0); diff --git a/vcnet/config.h b/vcnet/config.h index 563168690..0b0dcdcde 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -578,20 +578,6 @@ typedef unsigned long useconds_t; /* - * Various scripting languages... - */ - -/* #undef HAVE_JAVA */ -#define CUPS_JAVA "" -/* #undef HAVE_PERL */ -#define CUPS_PERL "" -/* #undef HAVE_PHP */ -#define CUPS_PHP "" -/* #undef HAVE_PYTHON */ -#define CUPS_PYTHON "" - - -/* * Do we have CoreFoundation public and private headers? */ diff --git a/xcode/config.h b/xcode/config.h index 760d723a8..14783ab1c 100644 --- a/xcode/config.h +++ b/xcode/config.h @@ -517,22 +517,6 @@ /* - * Various scripting languages... - */ - -#if !TARGET_OS_IOS -# define HAVE_JAVA 1 -# define CUPS_JAVA "/usr/bin/java" -# define HAVE_PERL 1 -# define CUPS_PERL "/usr/bin/perl" -# define HAVE_PHP 1 -# define CUPS_PHP "/usr/bin/php" -# define HAVE_PYTHON 1 -# define CUPS_PYTHON "/usr/bin/python" -#endif /* !TARGET_OS_IOS */ - - -/* * Do we have CoreFoundation public and private headers? */ |