You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/10 14:26:02 UTC

[GitHub] [pulsar] tisonkun commented on a diff in pull request #15412: [fix][Broker] NarUnpacker create directory and file without permission check

tisonkun commented on code in PR #15412:
URL: https://github.com/apache/pulsar/pull/15412#discussion_r1045091920


##########
pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarUnpacker.java:
##########
@@ -69,7 +73,7 @@ static File doUnpackNar(final File nar, final File baseWorkingDirectory, Runnabl
             throws IOException {
         File parentDirectory = new File(baseWorkingDirectory, nar.getName() + "-unpacked");
         if (!parentDirectory.exists()) {
-            if (parentDirectory.mkdirs()) {
+            if (createDirWithSpecialPermission(parentDirectory, "rwxr-x---", true)) {

Review Comment:
   I'd prefer to use constants for these perm settings. But it should not be a blocker.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

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