lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.98.0704221144250.9964@woody.linux-foundation.org>
Date:	Sun, 22 Apr 2007 11:54:41 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Nicolas Pitre <nico@....org>
cc:	Junio C Hamano <junkio@....net>, git@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: Today's 'master' leaves .idx/.pack in 0400



On Sun, 22 Apr 2007, Nicolas Pitre wrote:
> 
> Well, actually there is no point making pack files writable.  If they're 
> modified, they get corrupted.
> 
> Here's the fix I wanted to propose:
> 
> diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
> index c72e07a..85c6e6e 100644
> --- a/builtin-pack-objects.c
> +++ b/builtin-pack-objects.c
> @@ -1786,11 +1786,13 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
>  		if (rename(pack_tmp_name, tmpname))
>  			die("unable to rename temporary pack file: %s",
>  			    strerror(errno));
> +		chmod(tmpname, 0444);

I think this is wrong (as is Junio's). I think we should still honor the 
repository permission setting, and default to honoring umask.

So I think that if the user has a umask that says "nobody else can read", 
then we should *not* make it world readable (unless the 
"shared_repository" thing is set to override it, of course).

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ