[PATCH] jar tool should honour umask while creating a jar
Ranjit Mathew
rmathew@hotmail.com
Thu Oct 17 22:07:00 GMT 2002
Tom Tromey wrote:
>>>>>>"Ranjit" == Ranjit Mathew <rmathew@hotmail.com> writes:
>>>>>
>
> Ranjit> I noticed that the jar tool with GCJ does not honour umask
> Ranjit> settings while creating a jar, while the jar tool included
> Ranjit> with Sun's JDK does. Now I don't have any specs to back this
> Ranjit> up, but I feel that the jar tool *should* honour the umask
> Ranjit> settings for the user running the tool.
>
> I agree.
>
> Ranjit> If you guys agree with me, you should consider applying
> Ranjit> the following patch to "fastjar/jartool.c":
>
> Ranjit> - jarfd = open(jarfile, O_CREAT | O_BINARY | O_WRONLY | O_TRUNC,
> Ranjit> - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
> Ranjit> + jarfd = open(jarfile, O_CREAT | O_BINARY | O_WRONLY | O_TRUNC);
>
> Let's add the missing bits instead.
> Or perhaps just use `0777'.
My understanding is that if you leave out the third mode argument,
the file is created in accordance with the umask of the user.
Thus the third argument is not needed IMO and hence the patch.
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/
More information about the Java-patches
mailing list