Subject: bin/5802: Su passes an undocumented option to csh
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@most.weird.com>
List: netbsd-bugs
Date: 07/19/1998 19:16:06
>Number:         5802
>Category:       bin
>Synopsis:       Su passes an undocumented option to csh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 19 16:20:01 1998
>Last-Modified:
>Originator:     Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release:        NetBSD-1.3.1
>Environment:

System: NetBSD most 1.3.1 NetBSD 1.3.1 (MOST) #0: Mon May 25 01:21:22 EDT 1998 woods@most:/usr/src-1.3.1/sys/arch/sparc/compile/MOST sparc

>Description:

	Su(1) passes an undocumented option, '-m', to csh(1).

>How-To-Repeat:

	Examine the source to su(1), and then to csh(1) and note that
	the former uses an undocumented option of the latter.

>Fix:

	Apply the following patch:

Index: csh.1
===================================================================
RCS file: /cvs/NetBSD/src/bin/csh/csh.1,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 csh.1
*** csh.1	1998/02/20 00:21:26	1.1.1.1
--- csh.1	1998/07/19 23:12:28
***************
*** 33,39 ****
  .\"
  .\"	@(#)csh.1	8.2 (Berkeley) 1/21/94
  .\"
! .Dd January 21, 1994
  .Dt CSH 1
  .Os BSD 4
  .Sh NAME
--- 33,39 ----
  .\"
  .\"	@(#)csh.1	8.2 (Berkeley) 1/21/94
  .\"
! .Dd July 19, 1998
  .Dt CSH 1
  .Os BSD 4
  .Sh NAME
***************
*** 97,102 ****
--- 97,107 ----
  The shell is a login shell (only applicable if
  .Fl l
  is the only flag specified).
+ .It Fl m
+ Read 
+ .Pa \&.cshrc
+ even if not owned by the user.  This flag is normally given only by
+ .Xr su 1 .
  .It Fl n
  Commands are parsed, but not executed.
  This aids in syntactic checking of shell scripts.
>Audit-Trail:
>Unformatted: