bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Taint marker for set -r


From: Sam James
Subject: Re: Taint marker for set -r
Date: Tue, 25 Aug 2026 13:08:24 +0100
User-agent: mu4e 1.14.3; emacs 32.0.50

Chet Ramey <chet.ramey@case.edu> writes:

> On 8/23/26 6:27 PM, Sam James wrote:
>> Hi,
>> I'm looking into use of rbash/set -r for sourcing and extracting
>> values
>> from a script (*). For my usecase, a Bash loadable plugin works for
>> allowing `source` in such an environment for a limited subset of paths.
>> I'd like to detect any operation which was denied by `set -r`, but I
>> don't want to impose `set -e` semantics as it'd be excessive and break
>> some of the scripts I need to source (which I can't modify for this).
>> Could any denied operation by way of set -r set some read-only
>> variable
>> that I can fetch after sourcing?
>
> I wonder if this would be better suited for a new trap.

Ah, that's a better idea indeed and would work well.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]