From: Johannes Sixt Date: Thu, 26 Mar 2009 09:58:58 GMT Subject: Re: [BUG?] How to make a shared/restricted repo? Message-ID: <49CB51E2.9010903@viscovery.net> In-Reply-To: <200903261044.58140.johan@herland.net> Johan Herland schrieb: > In the above patch, I've passed mode == -1 to finalize_temp_file() from all > callsites where there was no corresponding (f)chmod(foo, 0444). However, > after looking at the context (these are all either packs or loose objects), > I'm wondering if we shouldn't pass mode == 0444 for all of these. At which > point we could replace the above patch with this much simpler version: Indeed! > (We could also add an optional "mode" argument to adjust_shared_perm(), to > get rid of the double chmod().) And I think you should do that, otherwise you have a short time window where the permissions of a pack or loose object is less restrictive than you want. -- Hannes