ARTEMIS-5172: Reduce the permissions on temp file.
* Ensure that the temproray large message content can only be read by the user associated with the process. * Fixing initial ARTEMIS-5172 PR which wasn't removing rw permissions. Issue: https://issues.apache.org/jira/browse/ARTEMIS-5172 Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
This commit is contained in:
parent
c7ec3c7c77
commit
7eaea5a7a6
|
@ -651,9 +651,9 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
|
|||
|
||||
private File createLargeMessageCache(long messageId) throws IOException {
|
||||
File largeMessageCache = File.createTempFile("tmp-large-message-" + messageId + "-", ".tmp");
|
||||
largeMessageCache.setReadable(false);
|
||||
largeMessageCache.setExecutable(false);
|
||||
largeMessageCache.setWritable(false);
|
||||
largeMessageCache.setReadable(false, false);
|
||||
largeMessageCache.setExecutable(false, false);
|
||||
largeMessageCache.setWritable(false, false);
|
||||
largeMessageCache.setReadable(true, true);
|
||||
largeMessageCache.setWritable(true, true);
|
||||
largeMessageCache.deleteOnExit();
|
||||
|
|
Loading…
Reference in New Issue