This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]