Re: [PATCH] Be more careful with objects directory permissions on clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Hills schrieb:
> On Mon, 5 May 2008, Johannes Sixt wrote:
> 
>> Mark Hills schrieb:
>>> On Mon, 5 May 2008, Johannes Sixt wrote:
>>>
>>>> Mark Hills schrieb:
>>>>>          cd "$repo" &&
>>>>> -        find objects -depth -print | cpio $cpio_quiet_flag -pumd$l
>>>>> "$GIT_DIR/" || \
>>>>> +        # Create dirs using umask and permissions and destination
>>>>> +        find objects -type d -print | (cd "$GIT_DIR" && xargs mkdir
>>>>> -p) &&
>>>>> +        # Copy 0444 permissions on files
>>>>> +        find objects -type f -print | cpio $cpio_quiet_flag -pumd$l
>>>>> "$GIT_DIR/" || \
>>>>
>>>> Wouldn't that be better:
>>>>
>>>>     find objects ! -type d -print | cpio ...
>>>>
>>>> ?
>>>
>>> This was my first suggestion, unfortunately it shows up broken behaviour
>>> in all but the latest version of cpio. It creates 0700 directory
>>> permissions which is even worse.
>>
>> Sorry, I should have mentioned that I meant to keep the 'find | xargs
>> mkdir' and replace only the second 'find | cpio'.
> 
> Ah, I see.
> 
> I tend to think that an inclusive match has less scope for future bad
> behaviour than an exclusive match. Have I missed the possiblity that
> there may be content in the objects directory which is not a directory
> or file?

Theoretically, you could have symbolic links to loose objects or packs.

Generally, you shouldn't change the behavior of a program more than necessary.

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux