You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by kr...@apache.org on 2022/10/12 16:16:16 UTC

[solr] branch branch_9_1 updated (d23ad78dfa9 -> 2efecb6cf69)

This is an automated email from the ASF dual-hosted git repository.

krisden pushed a change to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/solr.git


    from d23ad78dfa9 SOLR-13219: Fix NPE in FieldLengthFeature with non-stored/missing fields (#1051)
     new e9100b9383a SOLR-16457: solr.data.home should not be set to empty string in bin/solr (#1066)
     new 2efecb6cf69 SOLR-16433: Security Manager prevents Solr SQL from working (#1044)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 solr/CHANGES.txt                                                      | 4 ++++
 solr/bin/solr                                                         | 3 ++-
 solr/docker/templates/Dockerfile.body.template                        | 1 +
 solr/modules/sql/src/resources/saffron.properties                     | 2 ++
 solr/server/etc/security.policy                                       | 4 ++++
 .../src/java/org/apache/solr/client/solrj/io/sql/DriverImpl.java      | 2 +-
 6 files changed, 14 insertions(+), 2 deletions(-)
 create mode 100644 solr/modules/sql/src/resources/saffron.properties


[solr] 01/02: SOLR-16457: solr.data.home should not be set to empty string in bin/solr (#1066)

Posted by kr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/solr.git

commit e9100b9383a1f7e85285b381f5ee3eefda7814b4
Author: Kevin Risden <ri...@users.noreply.github.com>
AuthorDate: Wed Oct 12 12:11:26 2022 -0400

    SOLR-16457: solr.data.home should not be set to empty string in bin/solr (#1066)
---
 solr/CHANGES.txt                               | 2 ++
 solr/bin/solr                                  | 3 ++-
 solr/docker/templates/Dockerfile.body.template | 1 +
 solr/server/etc/security.policy                | 4 ++++
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 8b8ecb09b82..83e796efa22 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -149,6 +149,8 @@ Bug Fixes
 
 * SOLR-16229: Http2SolrClient aborts requests on exception (Daniel Rabus, Tomás Fernández Löbbe)
 
+* SOLR-16457: solr.data.home should not be set to empty string in bin/solr (Kevin Risden)
+
 Other Changes
 ---------------------
 * SOLR-16351: Upgrade Carrot2 to 4.4.3, upgrade randomizedtesting to 2.8.0. (Dawid Weiss)
diff --git a/solr/bin/solr b/solr/bin/solr
index d5fb182e05c..9373ee6d01e 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -2225,6 +2225,7 @@ function start_solr() {
     fi
 
     if [ -n "${SOLR_DATA_HOME:-}" ]; then
+      SOLR_OPTS+=("-Dsolr.data.home=$SOLR_DATA_HOME")
       echo -e "    SOLR_DATA_HOME  = $SOLR_DATA_HOME"
     fi
     echo
@@ -2245,7 +2246,7 @@ function start_solr() {
     # users who don't care about useful error msgs can override in SOLR_OPTS with +OmitStackTraceInFastThrow
     "${SOLR_HOST_ARG[@]}" "-Duser.timezone=$SOLR_TIMEZONE" "-XX:-OmitStackTraceInFastThrow" \
     "-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" \
-    "-Djetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" "-Dsolr.data.home=${SOLR_DATA_HOME:-}" "-Dsolr.install.dir=$SOLR_TIP" \
+    "-Djetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" "-Dsolr.install.dir=$SOLR_TIP" \
     "-Dsolr.default.confdir=$DEFAULT_CONFDIR" "${LOG4J_CONFIG[@]}" "${SOLR_OPTS[@]}" "${SECURITY_MANAGER_OPTS[@]}" "${SOLR_ADMIN_UI}")
 
   mk_writable_dir "$SOLR_LOGS_DIR" "Logs"
diff --git a/solr/docker/templates/Dockerfile.body.template b/solr/docker/templates/Dockerfile.body.template
index 27ea08dc4a5..4177aa4b014 100644
--- a/solr/docker/templates/Dockerfile.body.template
+++ b/solr/docker/templates/Dockerfile.body.template
@@ -45,6 +45,7 @@ ENV SOLR_USER="solr" \
     SOLR_PID_DIR=/var/solr \
     SOLR_LOGS_DIR=/var/solr/logs \
     LOG4J_PROPS=/var/solr/log4j2.xml \
+    SOLR_SERVER_DIR="/opt/solr-${SOLR_VERSION}/server" \
     SOLR_JETTY_HOST="0.0.0.0"
 
 RUN set -ex; \
diff --git a/solr/server/etc/security.policy b/solr/server/etc/security.policy
index b0a07d802a3..8681d1e3663 100644
--- a/solr/server/etc/security.policy
+++ b/solr/server/etc/security.policy
@@ -27,6 +27,10 @@ grant {
   // system jar resources
   permission java.io.FilePermission "${java.home}${/}-", "read";
 
+  // tmpdir
+  permission java.io.FilePermission "${java.io.tmpdir}", "read,write";
+  permission java.io.FilePermission "${java.io.tmpdir}${/}-", "read,write,delete";
+
   // Test launchers (randomizedtesting, etc.)
   permission java.io.FilePermission "${junit4.childvm.cwd}", "read";
   permission java.io.FilePermission "${junit4.childvm.cwd}${/}temp", "read,write,delete";


[solr] 02/02: SOLR-16433: Security Manager prevents Solr SQL from working (#1044)

Posted by kr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 2efecb6cf69f19d0ae9a335e56d7ec136442cd1c
Author: Kevin Risden <ri...@users.noreply.github.com>
AuthorDate: Wed Oct 12 12:12:48 2022 -0400

    SOLR-16433: Security Manager prevents Solr SQL from working (#1044)
---
 solr/CHANGES.txt                                                        | 2 ++
 solr/modules/sql/src/resources/saffron.properties                       | 2 ++
 solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/DriverImpl.java | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 83e796efa22..b20f8374d13 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -151,6 +151,8 @@ Bug Fixes
 
 * SOLR-16457: solr.data.home should not be set to empty string in bin/solr (Kevin Risden)
 
+* SOLR-16433: Security Manager prevents Solr SQL from working (Kevin Risden)
+
 Other Changes
 ---------------------
 * SOLR-16351: Upgrade Carrot2 to 4.4.3, upgrade randomizedtesting to 2.8.0. (Dawid Weiss)
diff --git a/solr/modules/sql/src/resources/saffron.properties b/solr/modules/sql/src/resources/saffron.properties
new file mode 100644
index 00000000000..4a60b5d34e2
--- /dev/null
+++ b/solr/modules/sql/src/resources/saffron.properties
@@ -0,0 +1,2 @@
+# See SOLR-16433 and CALCITE-5298
+calcite.test.dataset=.
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/DriverImpl.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/DriverImpl.java
index a1230ab80b5..2218b815ade 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/DriverImpl.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/sql/DriverImpl.java
@@ -56,7 +56,7 @@ public class DriverImpl implements Driver {
 
     if (!props.containsKey("collection")) {
       throw new SQLException(
-          "The connection url has no connection properties. At a mininum the collection must be specified.");
+          "The connection url has no connection properties. At a minimum the collection must be specified.");
     }
     String collection = (String) props.remove("collection");