You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2023/01/18 20:18:33 UTC

[Bug 66434] New: -Djava.security.manager=allow prevents correct %~dp0 expansion on Windows using when loaded from the %PATH%

https://bz.apache.org/bugzilla/show_bug.cgi?id=66434

            Bug ID: 66434
           Summary: -Djava.security.manager=allow prevents correct %~dp0
                    expansion on Windows using <exec> when loaded from the
                    %PATH%
           Product: Ant
           Version: 1.10.13
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
          Assignee: notifications@ant.apache.org
          Reporter: robert.flaherty@oracle.com
  Target Milestone: ---

Created attachment 38468
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38468&action=edit
Test case: explode, change into root, run test.bat

I don't know if this is fixable or is just a known issue, but at least it can
help others trying to resolve similar issues.

When upgrading to 1.10.13 which has -Djava.security.manager=allow in ant.bat,
this caused failures in scripts that were run with <exec> and discovered along
the %PATH% and contained uses of %~dp0 (and I assume other expansions). 
Instead of expanding to the drive/path of the executed script, it expanded to
the drive/path of the CWD.

It worked if:
1) I remove -Djava.security.manager=allow in ant.bat
2) I add vmlauncher="false" in the <exec>

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 66434] -Djava.security.manager=allow prevents correct %~dp0 expansion on Windows using when loaded from the %PATH%

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66434

Jaikiran Pai <ja...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|All                         |Windows 10

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 66434] -Djava.security.manager=allow prevents correct %~dp0 expansion on Windows using when loaded from the %PATH%

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66434

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |66832


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=66832
[Bug 66832] File "allow.class" in ant-launcher.jar fails when Java module
system is used
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 66434] -Djava.security.manager=allow prevents correct %~dp0 expansion on Windows using when loaded from the %PATH%

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66434

Jaikiran Pai <ja...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Jaikiran Pai <ja...@apache.org> ---
Thank you for filing this. I was worried that we could run into issues like
these when I made that launcher script changes. As such, I have been interested
in any issues that this recent change has on real user projects. This will help
us decide how to move forward, in subsequent releases.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 66434] -Djava.security.manager=allow prevents correct %~dp0 expansion on Windows using when loaded from the %PATH%

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66434

Jaikiran Pai <ja...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |1.10.4
         Resolution|---                         |FIXED

--- Comment #2 from Jaikiran Pai <ja...@apache.org> ---
We have now reverted all these changes that were introduced in 1.10.13 release
of Ant. Ant no longer uses/supports Java SecurityManager when Ant is used in
Java 18+ versions. This should get us past all these issues.

It would be very helpful if you could try out our nightly build which contains
these fixes and see if it helps you with this issue
https://ci-builds.apache.org/job/Ant/job/Ant_Nightly/lastSuccessfulBuild/artifact/distribution/

-- 
You are receiving this mail because:
You are the assignee for the bug.