git: 9f0432041b8f - main - safe_eval.sh fix description of safe_set_var returns.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 Oct 2026 06:06:01 UTC
The branch main has been updated by sjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=9f0432041b8fb69832f10c32da50a67f34feeb61
commit 9f0432041b8fb69832f10c32da50a67f34feeb61
Author: Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2026-10-11 06:05:52 +0000
Commit: Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2026-10-11 06:05:52 +0000
safe_eval.sh fix description of safe_set_var returns.
The description was out of sync wrt return values.
1. invalid var
2. invalid val
3. var not in allowed list
---
libexec/rc/safe_eval.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libexec/rc/safe_eval.sh b/libexec/rc/safe_eval.sh
index 338221dfa564..940465581c62 100644
--- a/libexec/rc/safe_eval.sh
+++ b/libexec/rc/safe_eval.sh
@@ -1,6 +1,6 @@
:
# RCSid:
-# $Id: safe_eval.sh,v 1.31 2026/10/11 05:49:50 sjg Exp $
+# $Id: safe_eval.sh,v 1.32 2026/10/11 06:02:40 sjg Exp $
#
# @(#) Copyright (c) 2023-2026 Simon J. Gerraty
#
@@ -32,10 +32,10 @@ fi
# 'invalid' if they fail the relevant checks.
# 1. if "var" contains anything but 'A-Za-z0-9_' or matches 'ssv_*'
# we set ssv_var=invalid and return 1
-# 3. if "val" contains anything not in the combined set of
+# 2. if "val" contains anything not in the combined set of
# "only_chars" and "extra_chars" we will set ssv_val=invalid
-# and return 3
-# 2. if "allowed_vars" and "var" is not a member we return 2
+# and return 2
+# 3. if "allowed_vars" and "var" is not a member we return 3
# If "only_chars" is not provided we use 'A-Za-z0-9_ ,/=:+-'
# similar to save_set.
# If we pass all that, we eval "var=val" and return 0