You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.8 KiB
45 lines
1.8 KiB
3 months ago
|
From 118b93a189be2d39d2dc20ef059c9b38c60fe8be Mon Sep 17 00:00:00 2001
|
||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||
|
Date: Fri, 19 Jan 2024 13:18:00 +0000
|
||
|
Subject: [PATCH] generator/customize.ml: Split --chown parameter on ':'
|
||
|
character
|
||
|
|
||
|
The previous code split it on ',' which was completely wrong.
|
||
|
(It reveals the lack of testing however).
|
||
|
|
||
|
Fixes: commit c08032ebe2763f5e9ce5b14e003721475219d390
|
||
|
Reported-by: Yongkui Guo
|
||
|
(cherry picked from commit e9a728bb22dfa1de5328fbbe7d6d7acad2dbed64)
|
||
|
---
|
||
|
common | 2 +-
|
||
|
generator/customize.ml | 2 +-
|
||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
Submodule common 0dba002c..54869c98:
|
||
|
diff --git a/common/mlcustomize/customize_cmdline.ml b/common/mlcustomize/customize_cmdline.ml
|
||
|
index 245d9960..48ee3344 100644
|
||
|
--- a/common/mlcustomize/customize_cmdline.ml
|
||
|
+++ b/common/mlcustomize/customize_cmdline.ml
|
||
|
@@ -157,7 +157,7 @@ let rec argspec () =
|
||
|
let len = String.length arg in
|
||
|
String.sub arg 0 i, String.sub arg (i+1) (len-(i+1))
|
||
|
and split_string_triplet option_name arg =
|
||
|
- match String.nsplit ~max:3 "," arg with
|
||
|
+ match String.nsplit ~max:3 ":" arg with
|
||
|
| [a; b; c] -> a, b, c
|
||
|
| _ ->
|
||
|
error (f_"invalid format for '--%s' parameter, see the man page")
|
||
|
diff --git a/generator/customize.ml b/generator/customize.ml
|
||
|
index e64b45c0..e2c4b605 100644
|
||
|
--- a/generator/customize.ml
|
||
|
+++ b/generator/customize.ml
|
||
|
@@ -775,7 +775,7 @@ let rec argspec () =
|
||
|
let len = String.length arg in
|
||
|
String.sub arg 0 i, String.sub arg (i+1) (len-(i+1))
|
||
|
and split_string_triplet option_name arg =
|
||
|
- match String.nsplit ~max:3 \",\" arg with
|
||
|
+ match String.nsplit ~max:3 \":\" arg with
|
||
|
| [a; b; c] -> a, b, c
|
||
|
| _ ->
|
||
|
error (f_\"invalid format for '--%%s' parameter, see the man page\")
|