[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/09: daemon: Canonicalize gids to 0.
From: |
Ludovic Courtès |
Subject: |
08/09: daemon: Canonicalize gids to 0. |
Date: |
Tue, 31 May 2016 12:34:02 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 56b8f56788b082fc54dedbb003b2891294dd6c22
Author: Eelco Dolstra <address@hidden>
Date: Tue Jan 12 17:27:40 2016 +0100
daemon: Canonicalize gids to 0.
Previously files in the Nix store were owned by root or by nixbld,
depending on whether they were created by a substituter or by a
builder. This doesn't matter much, but causes spurious diffoscope
differences. So use root everywhere.
---
nix/libstore/local-store.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index 11f61ae..1eed0ca 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -606,10 +606,10 @@ static void canonicalisePathMetaData_(const Path & path,
uid_t fromUid, InodesSe
users group); we check for this case below. */
if (st.st_uid != geteuid()) {
#if HAVE_LCHOWN
- if (lchown(path.c_str(), geteuid(), (gid_t) -1) == -1)
+ if (lchown(path.c_str(), geteuid(), getegid()) == -1)
#else
if (!S_ISLNK(st.st_mode) &&
- chown(path.c_str(), geteuid(), (gid_t) -1) == -1)
+ chown(path.c_str(), geteuid(), getegid()) == -1)
#endif
throw SysError(format("changing owner of `%1%' to %2%")
% path % geteuid());
- branch master updated (8fe5d95 -> b452811), Ludovic Courtès, 2016/05/31
- 02/09: daemon: ~PathLocks(): Handle exceptions., Ludovic Courtès, 2016/05/31
- 07/09: daemon: check: Keep the differing output if -K is given., Ludovic Courtès, 2016/05/31
- 08/09: daemon: Canonicalize gids to 0.,
Ludovic Courtès <=
- 09/09: daemon: rounds: Keep the differing output if -K is given., Ludovic Courtès, 2016/05/31
- 05/09: daemon: check: Fix assertion failure when some outputs are missing., Ludovic Courtès, 2016/05/31
- 01/09: daemon: Handle /tmp being a symlink., Ludovic Courtès, 2016/05/31
- 03/09: daemon: Fix --repair failure on multiple-output derivations., Ludovic Courtès, 2016/05/31
- 06/09: daemon: check: Fix "failed to produce output path"., Ludovic Courtès, 2016/05/31
- 04/09: daemon: When repairing, rebuild if there is no substituter., Ludovic Courtès, 2016/05/31