home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / bash / bug / 509 < prev    next >
Encoding:
Text File  |  1992-07-29  |  2.0 KB  |  69 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!tct.COM!chip
  3. From: chip@tct.COM (Chip Salzenberg)
  4. Subject: Re: rsh, rcp with bash
  5. Message-ID: <2A7691FE.7354@tct.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: TC Telemanagement, Clearwater, FL
  8. References: <9207241236.AA02088.SM@odin.INS.CWRU.Edu>
  9. Distribution: gnu
  10. Date: Wed, 29 Jul 1992 12:41:34 GMT
  11. Approved: bug-bash@prep.ai.mit.edu
  12. Lines: 55
  13.  
  14. According to chet@po.cwru.edu:
  15. >Bash attempts to source the .bashrc for non-interactive shells running
  16. >rsh and rcp so things like $PATH get set.
  17.  
  18. ... which is, in my opinion, a BIG mistake.
  19.  
  20. Thus the following patch to Bash 1.12 to eliminate that behavior:
  21.  
  22. Index: shell.c
  23. ***************
  24. *** 567,572 ****
  25. --- 575,585 ----
  26.        bash foo        NO
  27.        foo            NO
  28. + #if BUGGY_DASH_C
  29.        rsh machine ls        YES (for rsh, which calls `bash -c')
  30.        rsh machine foo    YES (for shell started by rsh) NO (for foo!)
  31. + #else
  32. +      rsh machine ls        NO
  33. +      rsh machine foo    NO
  34. + #endif
  35.        echo ls | bash        NO
  36.        login            YES
  37. ***************
  38. *** 574,580 ****
  39.         */
  40.         if (!act_like_sh && !no_rc &&
  41. !       (interactive_shell || (!isatty (fileno (stdin)) &&
  42. !                  local_pending_command)))
  43. !     maybe_execute_file (bashrc_file);
  44.   
  45.         /* Try a TMB suggestion.  If running a script, then execute the
  46. --- 587,602 ----
  47.         */
  48.         if (!act_like_sh && !no_rc &&
  49. !       (interactive_shell
  50. ! #if BUGGY_DASH_C
  51. !        /* I'm sorry, but Brian Fox is just plain wrong here.
  52. !           He'd like to read .bashrc on "rsh host ls", but I
  53. !           can't support the weirdness it requires.  --Chip */
  54. !        || (!isatty (fileno (stdin)) && local_pending_command)
  55. ! #endif
  56. !        ))
  57. !     {
  58. !       maybe_execute_file (global_bashrc_file);
  59. !       maybe_execute_file (bashrc_file);
  60. !     }
  61.   
  62.         /* Try a TMB suggestion.  If running a script, then execute the
  63.  
  64. -- 
  65. Chip Salzenberg at Teltronics/TCT  <chip@tct.com>, <73717.366@compuserve.com>
  66.    "Do Rush place weird subliminal backmasked messages in their songs to
  67.  compel unwilling geeks to commit evil .sig atrocities?"  -- Dean Engelhardt
  68.  
  69.