Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Honor user's umask.
author
Junio C Hamano
<junkio@cox.net>
Sat, 1 Oct 2005 18:58:43 +0000
(11:58 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Sat, 1 Oct 2005 18:58:43 +0000
(11:58 -0700)
Fix the last two holdouts that forced mode bits stricter than the user's umask.
Noticed by Wolfgang Denk and fixed by Linus.
[jc: applied the same fix to mailsplit just for the sake of consistency.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
index.c
patch
|
blob
|
history
mailsplit.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
1fea629
)
diff --git
a/index.c
b/index.c
index 87fc7b0387b818001fb0e53fdb713fe1bad4f822..bdde65f75c9d2a9b77e6bf290ebed57f12c8e70b 100644
(file)
--- a/
index.c
+++ b/
index.c
@@
-29,7
+29,7
@@
int hold_index_file_for_update(struct cache_file *cf, const char *path)
signal(SIGINT, remove_lock_file_on_signal);
atexit(remove_lock_file);
}
signal(SIGINT, remove_lock_file_on_signal);
atexit(remove_lock_file);
}
- return open(cf->lockfile, O_RDWR | O_CREAT | O_EXCL, 06
00
);
+ return open(cf->lockfile, O_RDWR | O_CREAT | O_EXCL, 06
66
);
}
int commit_index_file(struct cache_file *cf)
}
int commit_index_file(struct cache_file *cf)
diff --git
a/mailsplit.c
b/mailsplit.c
index a3238c20da27c3348d406066b595cd085e600558..7afea1aaca6af966b6532ba66f7411d897a2874f 100644
(file)
--- a/
mailsplit.c
+++ b/
mailsplit.c
@@
-128,7
+128,7
@@
int main(int argc, char **argv)
unsigned long len = parse_email(map, size);
assert(len <= size);
sprintf(name, "%04d", ++nr);
unsigned long len = parse_email(map, size);
assert(len <= size);
sprintf(name, "%04d", ++nr);
- fd = open(name, O_WRONLY | O_CREAT | O_EXCL, 06
00
);
+ fd = open(name, O_WRONLY | O_CREAT | O_EXCL, 06
66
);
if (fd < 0) {
perror(name);
exit(1);
if (fd < 0) {
perror(name);
exit(1);