On 5 Dec 2014, at 18:14, Volker Simonis <volker.simo...@gmail.com> wrote:
> On Fri, Dec 5, 2014 at 7:09 PM, Chris Hegarty <chris.hega...@oracle.com> > wrote: >> Volker, >> >> Personally I would use the more verbose version, >> Files.setPosixFilePermissions, so we can see any failures. But as Alan >> pointed out, this is a temporary build tool, and I live with it either way. >> Is there any reason why you cannot use the NIO API ? > > No, for me it's no problem. I was just wondering if > Files.setPosixFilePermissions() would work on Windows. Because now it > is only used for the 'jspawnhelper' which is not built on Windows. If > Files.setPosixFilePermissions() doesn't throw an exception on Windows > I'll be happy to use that version for the binaries as well. OK thanks. You are saving us from ourselves! Please go with your 2nd webrev. http://cr.openjdk.java.net/~simonis/webrevs/8066766.v2/ -Chris. >> -Chris. >> >> On 5 Dec 2014, at 16:50, Volker Simonis <volker.simo...@gmail.com> wrote: >> >>> Hi Chris, >>> >>> thanks for the fast response. >>> >>> I saw that code in ImageBuilder, but it looked overly complicated to >>> me. What about cleaning that up as well: >>> >>> http://cr.openjdk.java.net/~simonis/webrevs/8066766.v2/ >>> >>> I've just checked that on Solaris 'jspawnhelper' still has the right >>> execution bits set after the change. >>> >>> Regards, >>> Volker >>> >>> On Fri, Dec 5, 2014 at 3:18 PM, Chris Hegarty <chris.hega...@oracle.com> >>> wrote: >>>> Thanks Volker, >>>> >>>> I agree with your change, or you can take the code from ImageBuilder. >>>> Either >>>> is fine with me. >>>> >>>> private void setExecutable(Path file) { >>>> try { >>>> Set<PosixFilePermission> perms = >>>> Files.getPosixFilePermissions(file); >>>> perms.add(PosixFilePermission.OWNER_EXECUTE); >>>> perms.add(PosixFilePermission.GROUP_EXECUTE); >>>> perms.add(PosixFilePermission.OTHERS_EXECUTE); >>>> Files.setPosixFilePermissions(file, perms); >>>> } catch (IOException ioe) { >>>> throw new UncheckedIOException(ioe); >>>> } >>>> } >>>> >>>> -Chris. >>>> >>>> >>>> On 05/12/14 14:07, Volker Simonis wrote: >>>>> >>>>> Hi, >>>>> >>>>> after the integration of the modular changes into jdk9-dev the >>>>> executable commands in jdk/bin and jre/bin images are only executable >>>>> by the file owner. This means that only the user who built the images >>>>> can execute the programs. >>>>> >>>>> This can be easily fixed with the following trivial change: >>>>> >>>>> http://cr.openjdk.java.net/~simonis/webrevs/8066766/ >>>>> https://bugs.openjdk.java.net/browse/JDK-8066766 >>>>> >>>>> Thanks, >>>>> Volker >>>>> >>>> >>