On 2/20/16 4:25 AM, Andrew Gregory wrote:
> Bash Version: 4.3
> Patch Level: 42
> Release Status: release
>
> Description:
> If run non-interactively with stdin closed and SHLVL=0, bash will
> source ~/.bashrc, due to run_startup_files() thinking that bash is
> being run by rshd.
>
> Repeat-By:
>
> #include
> #include
>
> void main(void) {
> close(0);
> setenv("SHLVL", "0", 1);
> execl("/bin/bash", "/bin/bash", "-c", "echo foo", NULL);
> }
>
> Fix:
> It looks like isnetconn needs to be modified to not count an fd
> that returns EBADF as a socket:
Thanks for the report and fix.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/