if you are modifying shutdown.c and if it would be reasonable to consider..
, but I did notice it earlier today,
and it is an important security concern. eg a multiphase
attack could start with redirecting stderr to /dev/null
and users would assume no error in their shell,
when there was.
I've already switched to
test -t 0 && test -t 2 || return 0
but in bash I use
export PS1="\${?%0} \u@\h:\w "
which is very handy to always know err state.
-George
--
George Georgalis, (415) 894-2710, http://www.galis.org/
On Mon, Sep 30, 2024 at 1:26 PM George Georgalis wrote:
>
> On Mon, Sep 30, 2024 at 1:09 PM wrote:
>
>> So how can the test be reliable in all circumstances?
>>
>
> test -t 0
>
> is reliable.
>
> I use
>
> tty -s || return 0
>
> to remind me w
On Mon, Sep 30, 2024 at 1:09 PM wrote:
> So how can the test be reliable in all circumstances?
>
test -t 0
is reliable.
I use
tty -s || return 0
to remind me what I'm testing for (same difference),
and branch out of .profile for not interactive sessions.
--
George Georgalis