[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#75810] [PATCH v8 10/16] daemon: Move comments where they belong.
From: |
Ludovic Courtès |
Subject: |
[bug#75810] [PATCH v8 10/16] daemon: Move comments where they belong. |
Date: |
Sun, 23 Mar 2025 15:25:03 +0100 |
* nix/libstore/build.cc (DerivationGoal::startBuilder): Shuffle
comments for clarity.
Change-Id: I6557c103ade4a3ab046354548ea193c68f8c9c05
---
nix/libstore/build.cc | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index e6a139eb0d..d0fcc99854 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1870,18 +1870,19 @@ void DerivationGoal::startBuilder()
}
dirsInChroot[tmpDirInSandbox] = tmpDir;
- /* Make the closure of the inputs available in the chroot,
- rather than the whole store. This prevents any access
- to undeclared dependencies. !!! As an extra security
- precaution, make the fake store only writable by the
- build user. */
+ /* Create the fake store. */
Path chrootStoreDir = chrootRootDir + settings.nixStore;
createDirs(chrootStoreDir);
chmod_(chrootStoreDir, 01775);
if (buildUser.enabled() && chown(chrootStoreDir.c_str(), 0,
buildUser.getGID()) == -1)
- throw SysError(format("cannot change ownership of ‘%1%’") %
chrootStoreDir);
+ /* As an extra security precaution, make the fake store only
+ writable by the build user. */
+ throw SysError(format("cannot change ownership of ‘%1%’") %
chrootStoreDir);
+ /* Make the closure of the inputs available in the chroot, rather than
+ the whole store. This prevents any access to undeclared
+ dependencies. */
foreach (PathSet::iterator, i, inputPaths) {
struct stat st;
if (lstat(i->c_str(), &st))
--
2.48.1
- [bug#75810] [PATCH v8 00/16] Rootless guix-daemon, Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 01/16] daemon: Use ‘close_range’ where available., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 03/16] daemon: Bind-mount /etc/nsswitch.conf & co. only if it exists., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 06/16] daemon: Remount root directory as read-only., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 02/16] daemon: Close the read end of the logging pipe., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 04/16] daemon: Bind-mount all the inputs, not just directories., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 05/16] daemon: Remount inputs as read-only., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 09/16] daemon: Drop Linux ambient capabilities before executing builder., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 08/16] daemon: Create /var/guix/profiles/per-user unconditionally., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 10/16] daemon: Move comments where they belong.,
Ludovic Courtès <=
- [bug#75810] [PATCH v8 07/16] daemon: Allow running as non-root with unprivileged user namespaces., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 11/16] linux-container: ‘unprivileged-user-namespace-supported?’ returns #f on non-Linux., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 12/16] tests: Add missing derivation inputs., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 13/16] tests: Run in a chroot and unprivileged user namespaces., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 14/16] etc: systemd services: Run ‘guix-daemon’ as an unprivileged user., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 16/16] DRAFT gnu: guix: Update to c9c7f87., Ludovic Courtès, 2025/03/23
- [bug#75810] [PATCH v8 15/16] guix-install.sh: Support the unprivileged daemon where possible., Ludovic Courtès, 2025/03/23