From nobody@FreeBSD.org  Sun May 15 23:52:12 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 78F2C106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 May 2011 23:52:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 68D318FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 May 2011 23:52:12 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p4FNqChJ029813
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 15 May 2011 23:52:12 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p4FNqCuC029812;
	Sun, 15 May 2011 23:52:12 GMT
	(envelope-from nobody)
Message-Id: <201105152352.p4FNqCuC029812@red.freebsd.org>
Date: Sun, 15 May 2011 23:52:12 GMT
From: Warren Block <wblock@wonkity.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] su.1: clarify use of -c as shell argument
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         157078
>Category:       docs
>Synopsis:       [patch] su.1: clarify use of -c as shell argument
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gjb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 16 00:00:25 UTC 2011
>Closed-Date:    Sat Jun 11 00:32:08 UTC 2011
>Last-Modified:  Sat Jun 11 00:40:08 UTC 2011
>Originator:     Warren Block
>Release:        8-STABLE
>Organization:
>Environment:
FreeBSD lightning 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat May 14 23:49:51 MDT 2011     root@lightning:/usr/obj/usr/src/sys/LIGHTNING  i386
>Description:
su(1) uses -c in an example, but does not explain that it is passed to a shell, not su's -c option.
>How-To-Repeat:
Compare the description of su's -c option in su.1 with the use of -c in the first example.
>Fix:
Apply patch.

Patch attached with submission follows:

--- usr.bin/su/su.1.orig	2011-05-15 16:57:35.000000000 -0600
+++ usr.bin/su/su.1	2011-05-15 17:29:24.000000000 -0600
@@ -197,10 +197,9 @@
 .Sh EXAMPLES
 .Bl -tag -width 5n -compact
 .It Li "su -m man -c catman"
-Runs the command
-.Li catman
-as user
-.Li man .
+As user
+.Li man , start a shell with the arguments
+.Dq "-c catman" .
 You will be asked for man's password unless your real UID is 0.
 Note that the
 .Fl m


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->gjb 
Responsible-Changed-By: gjb 
Responsible-Changed-When: Mon Jun 6 14:42:58 UTC 2011 
Responsible-Changed-Why:  
I'll take this. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=157078 
State-Changed-From-To: open->patched 
State-Changed-By: gjb 
State-Changed-When: Mon Jun 6 15:18:13 UTC 2011 
State-Changed-Why:  
Patched in head with minor rewording.  MFC in 5 days. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=157078 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/157078: commit references a PR
Date: Mon,  6 Jun 2011 15:18:10 +0000 (UTC)

 Author: gjb (doc committer)
 Date: Mon Jun  6 15:17:55 2011
 New Revision: 222758
 URL: http://svn.freebsd.org/changeset/base/222758
 
 Log:
   Document that when running 'su -m <user> -c <command>', <command> is run
   within a shell as <user>.
   
   PR:		157078
   Submitted by:	Warren Block <wblock@wonkity.com>
   MFC after:	5 days
 
 Modified:
   head/usr.bin/su/su.1
 
 Modified: head/usr.bin/su/su.1
 ==============================================================================
 --- head/usr.bin/su/su.1	Mon Jun  6 14:46:43 2011	(r222757)
 +++ head/usr.bin/su/su.1	Mon Jun  6 15:17:55 2011	(r222758)
 @@ -193,10 +193,10 @@ PAM configuration for
  .Sh EXAMPLES
  .Bl -tag -width 5n -compact
  .It Li "su -m man -c catman"
 -Runs the command
 -.Li catman
 -as user
 -.Li man .
 +Starts a shell as user
 +.Li man ,
 +and runs the command
 +.Li catman .
  You will be asked for man's password unless your real UID is 0.
  Note that the
  .Fl m
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: gjb 
State-Changed-When: Sat Jun 11 00:31:47 UTC 2011 
State-Changed-Why:  
MFCd to stable/8 and stable/7. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=157078 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/157078: commit references a PR
Date: Sat, 11 Jun 2011 00:32:48 +0000 (UTC)

 Author: gjb (doc committer)
 Date: Sat Jun 11 00:30:56 2011
 New Revision: 222965
 URL: http://svn.freebsd.org/changeset/base/222965
 
 Log:
   MFC 222758, 222759, 222770:
   
   - Document that when running 'su -m <user> -c <command>', <command> is
     run within a shell as <user>.
   - Bump date
   - Attempt to clear up some confusion in the following example, by
     stating the '-c' argument is passed to the shell, not to su(1), which
     would indicate the login class.
   
         'su -m <user> -c <command>'
   
   PR:		157078
 
 Modified:
   stable/8/usr.bin/su/su.1
 Directory Properties:
   stable/8/usr.bin/su/   (props changed)
 
 Modified: stable/8/usr.bin/su/su.1
 ==============================================================================
 --- stable/8/usr.bin/su/su.1	Sat Jun 11 00:06:14 2011	(r222964)
 +++ stable/8/usr.bin/su/su.1	Sat Jun 11 00:30:56 2011	(r222965)
 @@ -32,7 +32,7 @@
  .\"	@(#)su.1	8.2 (Berkeley) 4/18/94
  .\" $FreeBSD$
  .\"
 -.Dd July 1, 2008
 +.Dd June 6, 2011
  .Dt SU 1
  .Os
  .Sh NAME
 @@ -197,16 +197,22 @@ PAM configuration for
  .Sh EXAMPLES
  .Bl -tag -width 5n -compact
  .It Li "su -m man -c catman"
 -Runs the command
 -.Li catman
 -as user
 -.Li man .
 +Starts a shell as user
 +.Li man ,
 +and runs the command
 +.Li catman .
  You will be asked for man's password unless your real UID is 0.
  Note that the
  .Fl m
  option is required since user
  .Dq man
  does not have a valid shell by default.
 +In this example,
 +.Fl c
 +is passed to the shell of the user
 +.Dq man ,
 +and is not interpreted as an argument to
 +.Nm .
  .It Li "su -m man -c 'catman /usr/share/man /usr/local/man'"
  Same as above, but the target command consists of more than a
  single word and hence is quoted for use with the
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/157078: commit references a PR
Date: Sat, 11 Jun 2011 00:33:13 +0000 (UTC)

 Author: gjb (doc committer)
 Date: Sat Jun 11 00:31:37 2011
 New Revision: 222966
 URL: http://svn.freebsd.org/changeset/base/222966
 
 Log:
   MFC 222758, 222759, 222770:
   
   - Document that when running 'su -m <user> -c <command>', <command> is
     run within a shell as <user>.
   - Bump date
   - Attempt to clear up some confusion in the following example, by
     stating the '-c' argument is passed to the shell, not to su(1), which
     would indicate the login class.
   
         'su -m <user> -c <command>'
   
   PR:		157078
 
 Modified:
   stable/7/usr.bin/su/su.1
 Directory Properties:
   stable/7/usr.bin/su/   (props changed)
 
 Modified: stable/7/usr.bin/su/su.1
 ==============================================================================
 --- stable/7/usr.bin/su/su.1	Sat Jun 11 00:30:56 2011	(r222965)
 +++ stable/7/usr.bin/su/su.1	Sat Jun 11 00:31:37 2011	(r222966)
 @@ -32,7 +32,7 @@
  .\"	@(#)su.1	8.2 (Berkeley) 4/18/94
  .\" $FreeBSD$
  .\"
 -.Dd July 1, 2008
 +.Dd June 6, 2011
  .Dt SU 1
  .Os
  .Sh NAME
 @@ -197,16 +197,22 @@ PAM configuration for
  .Sh EXAMPLES
  .Bl -tag -width 5n -compact
  .It Li "su -m man -c catman"
 -Runs the command
 -.Li catman
 -as user
 -.Li man .
 +Starts a shell as user
 +.Li man ,
 +and runs the command
 +.Li catman .
  You will be asked for man's password unless your real UID is 0.
  Note that the
  .Fl m
  option is required since user
  .Dq man
  does not have a valid shell by default.
 +In this example,
 +.Fl c
 +is passed to the shell of the user
 +.Dq man ,
 +and is not interpreted as an argument to
 +.Nm .
  .It Li "su -m man -c 'catman /usr/share/man /usr/local/man'"
  Same as above, but the target command consists of more than a
  single word and hence is quoted for use with the
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
