Re: Taint marker for set -r

Chet Ramey <[email protected]>
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
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.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc (application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE-----

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCaoxfjgUDAAAAAAAKCRC7WGnwZOp0qyAk
AJ9tLR9l0epnx5pgTv7UQgwqAsbZIQCaAiwmz0nTObQSrsk95dRWmJG4wio=
=I2ZL
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.