[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#48889] [PATCH 2/4] Ceph: patch rbd to use $PATH lookups for modprob
From: |
Maxime Devos |
Subject: |
[bug#48889] [PATCH 2/4] Ceph: patch rbd to use $PATH lookups for modprobe |
Date: |
Mon, 07 Jun 2021 11:40:59 +0200 |
User-agent: |
Evolution 3.34.2 |
Ryan Sundberg via Guix-patches via schreef op zo 06-06-2021 om 11:52 [-0700]:
> Removes hardcoded paths assumed in /sbin and /bin compiled into the
> `rbd` tool.
>
> Patch originally discussed at https://github.com/ceph/ceph/pull/20938
> and rejected by upstream for ambiguous security concerns related to
> relative paths.
> ---
> .../patches/ceph-relative-paths.patch | 22 +++++++++++++++++++
> gnu/packages/storage.scm | 2 +-
> 2 files changed, 23 insertions(+), 1 deletion(-)
> create mode 100644 gnu/packages/patches/ceph-relative-paths.patch
>
> diff --git a/gnu/packages/patches/ceph-relative-paths.patch
> b/gnu/packages/patches/ceph-relative-paths.patch
> new file mode 100644
> index 0000000000..e1b1d3599f
> --- /dev/null
> +++ b/gnu/packages/patches/ceph-relative-paths.patch
> @@ -0,0 +1,22 @@
> +diff --git a/src/common/module.c b/src/common/module.c
> +index f19f74324c..53355b8185 100644
> +--- a/src/common/module.c
> ++++ b/src/common/module.c
> +@@ -66,7 +66,7 @@ int module_has_param(const char *module, const char *param)
> + char command[128];
> +
> + snprintf(command, sizeof(command),
> +- "/sbin/modinfo -F parm %s | /bin/grep -q ^%s:",
> ++ "modinfo -F parm %s | grep -q ^%s:",
modinfo is not necessarily in the profile. I'd recommend
using substitute* from a build phase to replace
/sbin/modinfo with the appropriate /gnu/store path.
((string-append (assoc-ref inputs "???") "/sbin/modinfo")
or something like that, were you'll need to replace "???")
> +- snprintf(command, sizeof(command), "/sbin/modprobe %s %s",
> ++ snprintf(command, sizeof(command), "modprobe %s %s",
> + module, (options ? options : ""));
Likewise.
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
- [bug#48889] [PATCH 1/4] New package: bird bgp daemon, versions 1 and 2, Ryan Sundberg, 2021/06/06
- [bug#48889] [PATCH 2/4] Ceph: patch rbd to use $PATH lookups for modprobe, Ryan Sundberg, 2021/06/06
- [bug#48889] [PATCH 2/4] Ceph: patch rbd to use $PATH lookups for modprobe,
Maxime Devos <=
- [bug#48889] [PATCH 4/4] bpftool: new package, Ryan Sundberg, 2021/06/06
- [bug#48889] [PATCH 3/4] Ceph: upgrade minor version to latest stable release (14.2.21), Ryan Sundberg, 2021/06/06
- [bug#48889] [PATCH 1/4] New package: bird bgp daemon, versions 1 and 2, Maxime Devos, 2021/06/07