Re: [VOTE] Release Apache Tomcat 7.0.108

2021-02-02 Thread Violeta Georgieva
На чт, 28.01.2021 г. в 11:48 ч. Violeta Georgieva 
написа:
>
> The proposed Apache Tomcat 7.0.108 release is now available for voting.
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.108/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1295/
> The git tag is:
> https://github.com/apache/tomcat/tree/7.0.108
> b57a2ea4466a2d4ea03a0f90e3f0d6c485b3cfea
>
> The proposed 7.0.108 release is:
> [ ] Broken - do not release
> [X] Stable - go ahead and release as 7.0.108 Stable

+1

Regards,
Violeta

>


[GitHub] [tomcat] minfrin commented on pull request #401: Add support for unix domain sockets (APR Protocol)

2021-02-02 Thread GitBox


minfrin commented on pull request #401:
URL: https://github.com/apache/tomcat/pull/401#issuecomment-771765720


   > Backported to 9.0.x, "ant test-apr" passes.
   > 
   > #402
   
   In trying to backport to 8.5.x, there are some further commits needing 
backporting to address conflicts:
   
   
https://github.com/minfrin/tomcat/commit/6945b88b1224b87e6a4ead667a8bb3640974cc03
   
https://github.com/minfrin/tomcat/commit/e99071f5c235e86e9781e8df9f62709d2e57cc03
   
https://github.com/minfrin/tomcat/commit/1d108f4ff477354ba065fc99d4f8c781af42bd6c
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] michael-o commented on pull request #401: Add support for unix domain sockets (APR Protocol)

2021-02-02 Thread GitBox


michael-o commented on pull request #401:
URL: https://github.com/apache/tomcat/pull/401#issuecomment-771777818


   Yes, let's do 9.0.x first. @rmaucher has added an acceptable solution for 
Windows. This should be ported to the `AprEndpoint` too.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Ignoring test failures

2021-02-02 Thread Emmanuel Bourg
Hi all,

I'd like to add a mechanism to the Tomcat build to ignore the test
failures, something similar to the Maven testFailureIgnore property.

In Debian Tomcat is built in an offline container and the tribes tests
fail due to the lack of multicast. So build.xml has been patched to
remove the  tasks, but it would be easier to set a build property
instead.

Do you think we could add something like this:

  

Emmanuel Bourg

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE][RESULT] Release Apache Tomcat 10.0.2

2021-02-02 Thread Rémy Maucherat
On Tue, Feb 2, 2021 at 8:09 PM Mark Thomas  wrote:

> The following votes were cast:
>
> Binding:
> +1 (stable): markt, remm, mgrigorov
>
> No other votes were cast.
>
> The vote therefore passes.
>
> This will be the first stable 10.0.x release. Woot!
>

Congratulations ! :)

Rémy


>
> Thanks to everyone who contributed to this release.
>
> Mark
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[tomcat] branch master updated: Fix typo

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new bab9d8c  Fix typo
bab9d8c is described below

commit bab9d8cadb18637a47863009cc22ce42dda1c34b
Author: Mark Thomas 
AuthorDate: Tue Feb 2 19:22:43 2021 +

Fix typo
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 59a13e6..ef677ef 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,7 +55,7 @@ install:
 - ant -version
 - rm -rf $HOME/tmp
 - export CURR_PWD=`pwd`
-- git clone -q -b 1.6.x --single-branch https://github.com/apache/apr.git 
HOME/tmp/apr
+- git clone -q -b 1.6.x --single-branch https://github.com/apache/apr.git 
$HOME/tmp/apr
 - cd $HOME/tmp/apr
 - ./buildconf
 - ./configure --prefix=$HOME/tmp/apr-build


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Add release date for 9.0.43

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new d5f74c4  Add release date for 9.0.43
d5f74c4 is described below

commit d5f74c4257ee656bfb2affed07456036fcdec5c6
Author: Mark Thomas 
AuthorDate: Tue Feb 2 19:18:28 2021 +

Add release date for 9.0.43
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5cd4b0d..919eaab 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -121,7 +121,7 @@
 
   
 
-
+
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r45758 - /dev/tomcat/tomcat-9/v9.0.43/ /release/tomcat/tomcat-9/v9.0.43/

2021-02-02 Thread markt
Author: markt
Date: Tue Feb  2 19:18:04 2021
New Revision: 45758

Log:
Release Apache Tomcat 9.0.43

Added:
release/tomcat/tomcat-9/v9.0.43/
  - copied from r45757, dev/tomcat/tomcat-9/v9.0.43/
Removed:
dev/tomcat/tomcat-9/v9.0.43/


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[VOTE][RESULT] Release Apache Tomcat 9.0.43

2021-02-02 Thread Mark Thomas
The following votes were cast:

Binding:
+1 (stable): markt, remm, jfclere, mgrigorov, eboourg

Non-binding:
+1 (stable): rmannibucau

The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Add release date for 10.0.2

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 2bdf8e6  Add release date for 10.0.2
2bdf8e6 is described below

commit 2bdf8e63fe3fe1bd1e2268596b579ba9fca09530
Author: Mark Thomas 
AuthorDate: Tue Feb 2 19:13:42 2021 +

Add release date for 10.0.2
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8649610..3a84ec7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -126,7 +126,7 @@
 
   
 
-
+
   
 
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r45757 - /dev/tomcat/tomcat-10/v10.0.2/ /release/tomcat/tomcat-10/v10.0.2/

2021-02-02 Thread markt
Author: markt
Date: Tue Feb  2 19:12:17 2021
New Revision: 45757

Log:
Release Apache Tomcat 10.0.2

Added:
release/tomcat/tomcat-10/v10.0.2/
  - copied from r45756, dev/tomcat/tomcat-10/v10.0.2/
Removed:
dev/tomcat/tomcat-10/v10.0.2/


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[VOTE][RESULT] Release Apache Tomcat 10.0.2

2021-02-02 Thread Mark Thomas
The following votes were cast:

Binding:
+1 (stable): markt, remm, mgrigorov

No other votes were cast.

The vote therefore passes.

This will be the first stable 10.0.x release. Woot!

Thanks to everyone who contributed to this release.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Increment version for next dev cycle

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new ad02133  Increment version for next dev cycle
ad02133 is described below

commit ad02133712cc78108c6c667b821c5dfeb671bd48
Author: Mark Thomas 
AuthorDate: Tue Feb 2 18:02:06 2021 +

Increment version for next dev cycle
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index da90ce6..bef3e18 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -25,7 +25,7 @@
 # - Version Control Flags -
 version.major=8
 version.minor=5
-version.build=63
+version.build=64
 version.patch=0
 version.suffix=-dev
 
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index e311d84..3be5f3c 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -39,7 +39,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases.https
 
 # Release version info
-maven.asf.release.deploy.version=8.5.63
+maven.asf.release.deploy.version=8.5.64
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix test failure when running under cobertura

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 7778a16  Fix test failure when running under cobertura
7778a16 is described below

commit 7778a166d83f27fa0e367f1f70511cc01eff70ea
Author: Mark Thomas 
AuthorDate: Tue Feb 2 17:56:30 2021 +

Fix test failure when running under cobertura
---
 test/org/apache/catalina/loader/TestVirtualWebappLoader.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/org/apache/catalina/loader/TestVirtualWebappLoader.java 
b/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
index 11d840e..8a158a9 100644
--- a/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
+++ b/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
@@ -54,6 +54,8 @@ public class TestVirtualWebappLoader extends TomcatBaseTest {
 loader.setContext(ctx);
 ctx.setLoader(loader);
 
+ctx.setResources(new StandardRoot(ctx));
+ctx.resourcesStart();
 
 loader.start();
 Assert.assertSame(cl, loader.getClassLoader());


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Fix test failure when running under cobertura

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 5e719fe  Fix test failure when running under cobertura
5e719fe is described below

commit 5e719fec5b04676b79a4e57d1f55c1732d8323a2
Author: Mark Thomas 
AuthorDate: Tue Feb 2 17:56:30 2021 +

Fix test failure when running under cobertura
---
 test/org/apache/catalina/loader/TestVirtualWebappLoader.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/org/apache/catalina/loader/TestVirtualWebappLoader.java 
b/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
index 11d840e..8a158a9 100644
--- a/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
+++ b/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
@@ -54,6 +54,8 @@ public class TestVirtualWebappLoader extends TomcatBaseTest {
 loader.setContext(ctx);
 ctx.setLoader(loader);
 
+ctx.setResources(new StandardRoot(ctx));
+ctx.resourcesStart();
 
 loader.start();
 Assert.assertSame(cl, loader.getClassLoader());


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] michael-o commented on pull request #401: Add support for unix domain sockets (APR Protocol)

2021-02-02 Thread GitBox


michael-o commented on pull request #401:
URL: https://github.com/apache/tomcat/pull/401#issuecomment-771777818


   Yes, let's do 9.0.x first. @rmaucher has added an acceptable solution for 
Windows. This should be ported to the `AprEndpoint` too.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] minfrin commented on pull request #401: Add support for unix domain sockets (APR Protocol)

2021-02-02 Thread GitBox


minfrin commented on pull request #401:
URL: https://github.com/apache/tomcat/pull/401#issuecomment-771765720


   > Backported to 9.0.x, "ant test-apr" passes.
   > 
   > #402
   
   In trying to backport to 8.5.x, there are some further commits needing 
backporting to address conflicts:
   
   
https://github.com/minfrin/tomcat/commit/6945b88b1224b87e6a4ead667a8bb3640974cc03
   
https://github.com/minfrin/tomcat/commit/e99071f5c235e86e9781e8df9f62709d2e57cc03
   
https://github.com/minfrin/tomcat/commit/1d108f4ff477354ba065fc99d4f8c781af42bd6c
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [tomcat] branch master updated: Apply same UDS path perm approach in the AprEndpoint as in the NioEndpoint

2021-02-02 Thread Graham Leggett
On 01 Feb 2021, at 22:11, Michael Osipov  wrote:

>> If I’m reading this correctly this breaks Windows - the permissions on the 
>> UDS socket will be the same as those of the Tomcat process, which is “I can 
>> talk to me, but everyone else is read only, so unless you’re me I refuse to 
>> serve your request”.
>> I think the fix is the other way around, the NioEndpoint needs to default to:
>>> -file.setReadable(true, false);
>>> -file.setWritable(true, false);
> 
> That's a good point. I expect this to be consistent. A few questions arise 
> here:
> * Did you try that on Windows?
> * Do the same semantics apply to UDS on NTFS as on POSIX filesystems?
> 
> According to [1] and [2], yes. An ideal solution is [3], but hard to 
> implement.
> 
> By calling #setWritable() who in the system can gain access to the UDS? 
> What's worse is that the admin cannot reasonably change that.

The above describes the default behaviour in the absence of any configuration, 
which is “allow anyone to make a request, if you want this protected (and you 
do) put this socket in a suitably protected directory".

On a unix machine it would look like this:

[root@hostname clamav-milter]# ls -al
total 0
drwx--x---.  2 clamilt clamilt   60 Jan 11 13:03 .
drwxr-xr-x. 39 rootroot1080 Jan 11 13:06 ..
srw-rw-rw-.  1 clamilt clamilt0 Jan 11 13:03 clamav-milter.socket

The socket above is rw-rw-rw, while the parent directory is “accessible to user 
clamilt and group clamilt only and not accessible to anyone else”, which 
achieves the end goal of “only people in group clamilt are allowed to make 
requests, everyone else gets permission denied”.

Windows defaults are tricky because java recognises just two reliable concepts, 
the file’s owner and everyone. Limit to file’s owner is useless (and highly 
undesirable, as someone might believe running other applications as the same 
user as the tomcat user is a good idea), leaving “limit to everyone” as the 
only sane choice.

https://docs.oracle.com/javase/7/docs/api/java/io/File.html#setWritable(boolean,%20boolean)

The worst case scenario is that an admin places the accessible-to-everyone 
socket in an accessible-to-everyone directory, and now we’re equivalent to 
running tomcat on localhost, which is no worse than what we have today.

Regards,
Graham
—



[GitHub] [tomcat] Thihup opened a new pull request #404: Update translation

2021-02-02 Thread GitBox


Thihup opened a new pull request #404:
URL: https://github.com/apache/tomcat/pull/404


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Very basic permissions for non posix filesystems

2021-02-02 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new ec5ec91  Very basic permissions for non posix filesystems
ec5ec91 is described below

commit ec5ec916741efe3a5046a9851a96347a34f230ee
Author: remm 
AuthorDate: Tue Feb 2 14:13:35 2021 +0100

Very basic permissions for non posix filesystems
---
 java/org/apache/tomcat/util/net/LocalStrings.properties |  2 ++
 java/org/apache/tomcat/util/net/NioEndpoint.java| 17 ++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties 
b/java/org/apache/tomcat/util/net/LocalStrings.properties
index bcf697c..76625b0 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings.properties
@@ -97,6 +97,8 @@ endpoint.nio.keyProcessingError=Error processing selection key
 endpoint.nio.latchMustBeZero=Latch must be at count zero or null
 endpoint.nio.nullLatch=Latch cannot be null
 endpoint.nio.nullSocketChannel=Invalid null socket channel while processing 
poller event
+endpoint.nio.perms.readFail=Failed to set read permissions for Unix domain 
socket [{0}]
+endpoint.nio.perms.writeFail=Failed to set write permissions for Unix domain 
socket [{0}]
 endpoint.nio.pollerEventError=Error processing poller event
 endpoint.nio.registerFail=Failed to register socket with selector from poller
 endpoint.nio.selectorCloseFail=Failed to close selector when closing the poller
diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index a748819..bc552f4 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -277,10 +277,21 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 serverSock = 
JreCompat.getInstance().openUnixDomainServerSocketChannel();
 serverSock.bind(sa, getAcceptCount());
 if (getUnixDomainSocketPathPermissions() != null) {
-FileAttribute> attrs =
-
PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString(getUnixDomainSocketPathPermissions()));
 Path path = Paths.get(getUnixDomainSocketPath());
-Files.setAttribute(path, attrs.name(), attrs.value());
+Set permissions =
+
PosixFilePermissions.fromString(getUnixDomainSocketPathPermissions());
+if 
(path.getFileSystem().supportedFileAttributeViews().contains("posix")) {
+FileAttribute> attrs = 
PosixFilePermissions.asFileAttribute(permissions);
+Files.setAttribute(path, attrs.name(), attrs.value());
+} else {
+java.io.File file = 
Paths.get(getUnixDomainSocketPath()).toFile();
+if (permissions.contains(PosixFilePermission.OTHERS_READ) 
&& !file.setReadable(true, false)) {
+log.warn(sm.getString("endpoint.nio.perms.readFail", 
path));
+}
+if (permissions.contains(PosixFilePermission.OTHERS_WRITE) 
&& !file.setWritable(true, false)) {
+log.warn(sm.getString("endpoint.nio.perms.writeFail", 
path));
+}
+}
 }
 } else {
 serverSock = ServerSocketChannel.open();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Very basic permissions for non posix filesystems

2021-02-02 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 39f3b06  Very basic permissions for non posix filesystems
39f3b06 is described below

commit 39f3b06ae9f18d27d5f1620d34037e17394d03f3
Author: remm 
AuthorDate: Tue Feb 2 14:09:00 2021 +0100

Very basic permissions for non posix filesystems
---
 .../org/apache/tomcat/util/net/LocalStrings.properties |  2 ++
 java/org/apache/tomcat/util/net/NioEndpoint.java   | 18 ++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties 
b/java/org/apache/tomcat/util/net/LocalStrings.properties
index 54dd3d9..b1e5c2a 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings.properties
@@ -98,6 +98,8 @@ endpoint.nio.keyProcessingError=Error processing selection key
 endpoint.nio.latchMustBeZero=Latch must be at count zero or null
 endpoint.nio.nullLatch=Latch cannot be null
 endpoint.nio.nullSocketChannel=Invalid null socket channel while processing 
poller event
+endpoint.nio.perms.readFail=Failed to set read permissions for Unix domain 
socket [{0}]
+endpoint.nio.perms.writeFail=Failed to set write permissions for Unix domain 
socket [{0}]
 endpoint.nio.pollerEventError=Error processing poller event
 endpoint.nio.registerFail=Failed to register socket with selector from poller
 endpoint.nio.selectorCloseFail=Failed to close selector when closing the poller
diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
b/java/org/apache/tomcat/util/net/NioEndpoint.java
index 3c9515a..bc3f2ad 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -220,11 +220,21 @@ public class NioEndpoint extends 
AbstractJsseEndpoint
 serverSock = 
JreCompat.getInstance().openUnixDomainServerSocketChannel();
 serverSock.bind(sa, getAcceptCount());
 if (getUnixDomainSocketPathPermissions() != null) {
-FileAttribute> attrs =
-
PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString(
-getUnixDomainSocketPathPermissions()));
 Path path = Paths.get(getUnixDomainSocketPath());
-Files.setAttribute(path, attrs.name(), attrs.value());
+Set permissions =
+
PosixFilePermissions.fromString(getUnixDomainSocketPathPermissions());
+if 
(path.getFileSystem().supportedFileAttributeViews().contains("posix")) {
+FileAttribute> attrs = 
PosixFilePermissions.asFileAttribute(permissions);
+Files.setAttribute(path, attrs.name(), attrs.value());
+} else {
+java.io.File file = 
Paths.get(getUnixDomainSocketPath()).toFile();
+if (permissions.contains(PosixFilePermission.OTHERS_READ) 
&& !file.setReadable(true, false)) {
+log.warn(sm.getString("endpoint.nio.perms.readFail", 
path));
+}
+if (permissions.contains(PosixFilePermission.OTHERS_WRITE) 
&& !file.setWritable(true, false)) {
+log.warn(sm.getString("endpoint.nio.perms.writeFail", 
path));
+}
+}
 }
 } else {
 serverSock = ServerSocketChannel.open();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Expand coverage of unit tests

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new e597fea  Expand coverage of unit tests
e597fea is described below

commit e597fea003f87e9bd4b2e41cc2e46b3d737a13ce
Author: Mark Thomas 
AuthorDate: Tue Feb 2 10:18:39 2021 +

Expand coverage of unit tests
---
 test/org/apache/el/TestExpressionFactory.java | 48 +++
 1 file changed, 48 insertions(+)

diff --git a/test/org/apache/el/TestExpressionFactory.java 
b/test/org/apache/el/TestExpressionFactory.java
new file mode 100644
index 000..3396342
--- /dev/null
+++ b/test/org/apache/el/TestExpressionFactory.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.el;
+
+import javax.el.ELContext;
+import javax.el.ExpressionFactory;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.jasper.el.ELContextImpl;
+
+public class TestExpressionFactory {
+
+@Test(expected = NullPointerException.class)
+public void testCreateValueExpression2ParamNullExpectedType() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+Assert.assertNotNull(factory);
+
+factory.createValueExpression("foo", null);
+}
+
+
+@Test(expected = NullPointerException.class)
+public void testCreateValueExpression3ParamNullExpectedType() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+Assert.assertNotNull(factory);
+
+ELContext context = new ELContextImpl(factory);
+Assert.assertNotNull(context);
+
+factory.createValueExpression(context, "foo", null);
+}
+}


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Expand coverage of unit tests

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 12c629d  Expand coverage of unit tests
12c629d is described below

commit 12c629dc7d4bca690f812e021ca062db3c6b8b4a
Author: Mark Thomas 
AuthorDate: Tue Feb 2 10:18:39 2021 +

Expand coverage of unit tests
---
 test/org/apache/el/TestExpressionFactory.java | 48 +++
 1 file changed, 48 insertions(+)

diff --git a/test/org/apache/el/TestExpressionFactory.java 
b/test/org/apache/el/TestExpressionFactory.java
new file mode 100644
index 000..3396342
--- /dev/null
+++ b/test/org/apache/el/TestExpressionFactory.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.el;
+
+import javax.el.ELContext;
+import javax.el.ExpressionFactory;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.jasper.el.ELContextImpl;
+
+public class TestExpressionFactory {
+
+@Test(expected = NullPointerException.class)
+public void testCreateValueExpression2ParamNullExpectedType() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+Assert.assertNotNull(factory);
+
+factory.createValueExpression("foo", null);
+}
+
+
+@Test(expected = NullPointerException.class)
+public void testCreateValueExpression3ParamNullExpectedType() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+Assert.assertNotNull(factory);
+
+ELContext context = new ELContextImpl(factory);
+Assert.assertNotNull(context);
+
+factory.createValueExpression(context, "foo", null);
+}
+}


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Expand coverage of unit tests

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new cc49506  Expand coverage of unit tests
cc49506 is described below

commit cc49506e603d6e722c86e448379e877aed47d773
Author: Mark Thomas 
AuthorDate: Tue Feb 2 10:18:39 2021 +

Expand coverage of unit tests
---
 test/org/apache/el/TestExpressionFactory.java | 48 +++
 1 file changed, 48 insertions(+)

diff --git a/test/org/apache/el/TestExpressionFactory.java 
b/test/org/apache/el/TestExpressionFactory.java
new file mode 100644
index 000..3f7e2e7
--- /dev/null
+++ b/test/org/apache/el/TestExpressionFactory.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.el;
+
+import jakarta.el.ELContext;
+import jakarta.el.ExpressionFactory;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.jasper.el.ELContextImpl;
+
+public class TestExpressionFactory {
+
+@Test(expected = NullPointerException.class)
+public void testCreateValueExpression2ParamNullExpectedType() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+Assert.assertNotNull(factory);
+
+factory.createValueExpression("foo", null);
+}
+
+
+@Test(expected = NullPointerException.class)
+public void testCreateValueExpression3ParamNullExpectedType() {
+ExpressionFactory factory = ExpressionFactory.newInstance();
+Assert.assertNotNull(factory);
+
+ELContext context = new ELContextImpl(factory);
+Assert.assertNotNull(context);
+
+factory.createValueExpression(context, "foo", null);
+}
+}


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: ASF svn seems to be timing out. Use GitHub mirror instead.

2021-02-02 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new b8fbf89  ASF svn seems to be timing out. Use GitHub mirror instead.
b8fbf89 is described below

commit b8fbf8935225c36ada216e3713c92cabb8f5411d
Author: Mark Thomas 
AuthorDate: Tue Feb 2 09:46:01 2021 +

ASF svn seems to be timing out. Use GitHub mirror instead.
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index d72513a..59a13e6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,7 +55,7 @@ install:
 - ant -version
 - rm -rf $HOME/tmp
 - export CURR_PWD=`pwd`
-- svn co -q https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x/ 
$HOME/tmp/apr
+- git clone -q -b 1.6.x --single-branch https://github.com/apache/apr.git 
HOME/tmp/apr
 - cd $HOME/tmp/apr
 - ./buildconf
 - ./configure --prefix=$HOME/tmp/apr-build


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org