This is the mail archive of the
cygwin
mailing list for the Cygwin project.
rebase db perms seem too restrictive
- From: Shaddy Baddah <lithium-cygwin at shaddybaddah dot name>
- To: cygwin at cygwin dot com
- Date: Mon, 17 Nov 2014 14:14:50 +1100
- Subject: rebase db perms seem too restrictive
- Authentication-results: sourceware.org; auth=none
Hi,
I expect that there wasn't any explicit reasoning behind this, but
rebase creates a db with permissions that are too restrictive. To me
anyway, as I cannot see any danger in the db being readable by all.
This snippet describes it:
<snip>
$ whoami
sbaddah
$ od -c /etc/rebase.db.x86_64
od: /etc/rebase.db.x86_64: Permission denied
$ ls -l /etc/rebase.db.x86_64
-rw-rw---- 1 portapps None 86020 Nov 11 15:34 /etc/rebase.db.x86_64
</snip>
I've attached an untested patch that would allow at least world readable
perms. It would be appreciated if it was applied :-)
--
Regards,
Shaddy
diff --git a/rebase.c b/rebase.c
index 9504a48..a078e1d 100644
--- a/rebase.c
+++ b/rebase.c
@@ -288,7 +288,7 @@ mkstemp (char *name)
{
return _open (mktemp (name),
O_RDWR | O_BINARY | O_CREAT | O_EXCL | O_TRUNC | _O_SHORT_LIVED,
- _S_IREAD|_S_IWRITE);
+ _S_IREAD|_S_IWRITE|S_IRGRP|S_IROTH);
}
#endif
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple