LEAS-2795 mc: put-denied accepts the insufficient permissions wording of mc (run 3926)
release / release (push) Failing after 2m16s

This commit is contained in:
Pavlo Ratushnyi
2026-11-14 13:51:19 +01:00
parent bb972dde65
commit 897dc478be
+3 -1
View File
@@ -273,7 +273,7 @@ cmd_login_guard() {
cmd_put_denied() {
[ "$1" -ne 0 ] || refuse put-denied "the read-only user's PUT succeeded"
grep -qi 'access denied' "$2" || refuse put-denied "the PUT failed but not with Access Denied"
grep -Eqi 'access denied|insufficient permissions' "$2" || refuse put-denied "the PUT failed but not with Access Denied"
}
cmd_prove() {
@@ -381,6 +381,8 @@ cmd_self_test() {
control "allowed PUT" put-denied sh "$SELF" put-denied 0 "$tmp/ok.txt"
control "PUT that failed for another reason" put-denied sh "$SELF" put-denied 1 "$tmp/ok.txt"
accept "denied PUT" sh "$SELF" put-denied 1 "$tmp/denied.txt"
printf 'mc: <ERROR> Unable to write to one or more targets. Insufficient permissions to access this path.\n' > "$tmp/insufficient.txt"
accept "PUT refused for insufficient permissions" sh "$SELF" put-denied 1 "$tmp/insufficient.txt"
if [ -n "$(pin_value BASE_IMAGE vezha/PINS)" ]; then
kind=mc
last=BASE_IMAGE