This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[PATCH] jar tool should honour umask while creating a jar
- From: Ranjit Mathew <rmathew at hotmail dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Thu, 17 Oct 2002 12:37:52 +0530
- Subject: [PATCH] jar tool should honour umask while creating a jar
Hi,
I noticed that the jar tool with GCJ does not honour
umask settings while creating a jar, while the jar tool
included with Sun's JDK does. Now I don't have any specs
to back this up, but I feel that the jar tool *should*
honour the umask settings for the user running the tool.
If you guys agree with me, you should consider applying
the following patch to "fastjar/jartool.c":
------------------------------ 8< ------------------------------
--- jartool.c.orig Thu Oct 17 12:27:15 2002
+++ jartool.c Thu Oct 17 12:28:08 2002
@@ -440,6 +440,5 @@
if(action == ACTION_CREATE){
if(jarfile){
- jarfd = open(jarfile, O_CREAT | O_BINARY | O_WRONLY | O_TRUNC,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ jarfd = open(jarfile, O_CREAT | O_BINARY | O_WRONLY | O_TRUNC);
if(jarfd < 0){
------------------------------ 8< ------------------------------
Sincerely Yours,
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/