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 7aa'>treecommitdiff
path: root/gnu/packages/pretty-print.scm
AgeCommit message (Expand)Author
2024-09-16gnu: fmt-11: Add a source file-name....* gnu/packages/pretty-print.scm (fmt-11)[source]: Add a file-name field. Change-Id: Ib5e394b3312591a607d8277accece12f6aef15f5 Efraim Flashner
2024-09-09gnu: Add fmt-11....* gnu/packages/pretty-print.scm (fmt-11): New variable. (fmt-10): Inherit from fmt-11. Change-Id: Ic9f28cfb5a805f33beaad9794d69f992a5a27652 Signed-off-by: Zheng Junjie <zhengjunjie@iscas.ac.cn> Greg Hogan
2024-08-31gnu: Boost: Fix a bug that breaks libetonyek....This fixes <https://issues.guix.gnu.org/72040>. * gnu/packages/patches/boost-fix-duplicate-definitions-bug.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/boost.scm (boost)[source]: Use it. (boost-for-source-highlight): New variable, not using the patch. * gnu/packages/pretty-print.scm (source-highlight)[inputs]: Replace BOOST with BOOST-FOR-SOURCE-HIGHLIGHT. Change-Id: I5fbc9eb5000aefd7d3a14cc7a0482741032b5400 Leo Famulari
2024-05-06gnu: highlight: Update to 4.11....* gnu/packages/pretty-print.scm (highlight): Update to 4.11. [source]: Switch to git-fetch. [home-page]: Switch to html page. [arguments]<#:make-flags>: Use #$output replace %output. <#:phases>: Use ‘this-package-input‘ to find lua and perl. Reviewed-by: Dale Mellor <guix-devel-0brg6a@rdmp.org> Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614 chris
2024-04-05gnu: a2ps: Update to 4.15.6...* gnu/packages/pretty-print.scm (a2ps): Update to 4.15.6 Change-Id: I807970cf48ebb53df3f372a41d1379b85e3e9131 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Andy Tai