delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/11/16/22:15:29

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type; q=dns; s=default; b=ldqlHCXgcF5uwBUFuFlcHVrAT7kfV
ojgVW9yPT2tTKpRVKzG071H+4KwNbU6LBDpFU4P5QAGKCylSQbENfwo4lE5rzAk7
Rkylq5fzN6kQpIB2sxLI0tz3KfwnCf4NEvFoIUkgH9KQxl8zfeu4Meflafu9V0+3
9PduhL0ow6f4P0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type; s=default; bh=sbSqmSUROuUpWQzr//L5ZnGwNDw=; b=BVZ
UdxTq+d0LjcIGKzGeDcp47mQPisNq62/VMh+ItpDNHJUr2580DFwsYDtWIwJKs9s
IfQ8ygD528kbH08M5uyOUhvipfQriJi2qxjGTJC1+X78ZB9zVichk64nNTZ90w8L
lB/PTwzGlnRcffNcfufPHPtSZCnrCvrh7ZFGJay0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,T_FROM_12LTRDOM autolearn=ham version=3.3.2
X-HELO: mail6.worldispnetwork.com
Message-ID: <5469682A.6090501@shaddybaddah.name>
Date: Mon, 17 Nov 2014 14:14:50 +1100
From: Shaddy Baddah <lithium-cygwin AT shaddybaddah DOT name>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.7.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: rebase db perms seem too restrictive
X-IsSubscribed: yes

--------------070200040105050205070301
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------070200040105050205070301
Content-Type: text/x-patch;
 name="rebase.c.worldread.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="rebase.c.worldread.diff"

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
 


--------------070200040105050205070301
Content-Type: text/plain; charset=us-ascii

--
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
--------------070200040105050205070301--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019