From 0d85bbd42ddcd442864a9ba4719aca8b70d68048 Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Fri, 22 Apr 2022 11:32:15 +0200 Subject: [PATCH] Trust guix store directory To be able to execute binaries defined in OpenSSH configuration, we need to tell OpenSSH that we can trust Guix store objects. safe_path procedure takes a canonical path and for each component, walking upwards, checks ownership and permissions constrains which are: must be owned by root, not writable by group or others. --- misc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc.c b/misc.c index 0134d69..7131d5e 100644 --- a/misc.c +++ b/misc.c @@ -2146,6 +2146,7 @@ int safe_path(const char *name, struct stat *stp, const char *pw_dir, uid_t uid, char *err, size_t errlen) { + static const char guix_store[] = @STORE_DIRECTORY@; char buf[PATH_MAX], homedir[PATH_MAX]; char *cp; int comparehome = 0; @@ -2178,6 +2179,10 @@ safe_path(const char *name, struct stat *stp, const char *pw_dir, } strlcpy(buf, cp, sizeof(buf)); + /* If we are past the Guix store then we can stop */ + if (strcmp(guix_store, buf) == 0) + break; + if (stat(buf, &st) == -1 || (!platform_sys_dir_uid(st.st_uid) && st.st_uid != uid) || (st.st_mode & 022) != 0) { -- 2.34.0 final-inputs-self-contained.scm?id=6341dddcb9e7c8d555ea7294d61dcf64d775e032'>treecommitdiff
path: root/build-aux/check-final-inputs-self-contained.scm
AgeCommit message (Expand)Author
2021-03-10ci: Remove hydra support....This removes hydra support to use Cuirass as the only continuous integration system. * build-aux/hydra/gnu-system.scm: Remove it. * build-aux/hydra/guix-modular.scm: Ditto. * build-aux/hydra/guix.scm: Ditto. * build-aux/cuirass/hydra-to-cuirass.scm: Ditto. * Makefile.am (EXTRA_DIST): Update it. (hydra-jobs.scm): Remove it. (cuirass-jobs.scm): Update it. * build-aux/hydra/evaluate.scm: Move it to ... * build-aux/cuirass/evaluate.scm: ... here. * build-aux/cuirass/guix-modular.scm: Remove it. * build-aux/cuirass/gnu-system.scm: Ditto. * guix/packages.scm (%hydra-supported-systems): Rename it to ... (%cuirass-supported-systems): ... this variable. * build-aux/check-final-inputs-self-contained: Adapt it. * etc/release-manifest.scm: Ditto. * gnu/ci.scm (package->alist): Remove it. (derivation->job): New procedure. (package-job, package-cross-job, cross-jobs, image-jobs, system-test-jobs, tarball-jobs): Use it. (guix-jobs): New procedure. (hydra-jobs): Rename it to ... (cuirass-jobs): ... this procedure. Mathieu Othacehe
2018-12-04Remove most references to hydra.gnu.org....* Makefile.am (assert-binaries-available): Don't mention hydra.gnu.org in comment. * build-aux/check-available-binaries.scm: Likewise. * build-aux/check-final-inputs-self-contained.scm: Likewise. * doc/guix.texi (SUBSTITUTE-SERVER): New variable. Use it throughout instead of "mirror.hydra.gnu.org". * doc/contributing.texi (Submitting Patches): Likewise. * gnu/services/base.scm (hydra-key-authorization) (guix-activation): Remove mentions of "hydra.gnu.org" in comments and messages. * gnu/system/install.scm (%installation-services): Likewise. * guix/scripts/size.scm (guix-size): Likewise. Ludovic Courtès