From 5a41edb419512675b22482055bdba531cb1d7c08 Mon Sep 17 00:00:00 2001 From: Joseph Koshy Date: Mon, 8 Jun 1998 05:29:51 +0000 Subject: [PATCH] Reword to remove confusion between su(1)'s "-c" option and that of the shell being invoked. Add example that clarifies usage of "-c". PR: 6859 --- usr.bin/su/su.1 | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/usr.bin/su/su.1 b/usr.bin/su/su.1 index 5a46469f3708..a5e25e669da0 100644 --- a/usr.bin/su/su.1 +++ b/usr.bin/su/su.1 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)su.1 8.2 (Berkeley) 4/18/94 -.\" $Id: su.1,v 1.12 1997/10/27 22:05:05 guido Exp $ +.\" $Id: su.1,v 1.13 1998/05/25 03:34:52 steve Exp $ .\" .\" this is for hilit19's braindeadness: " .Dd April 18, 1994 @@ -144,13 +144,7 @@ overrides any previous ones. If the optional .Ar args are provided on the command line, they are passed to the login shell of -the target login. This allows it to pass arbitrary commands via -the -.Fl c -option as understood by most shells. Note that -.Fl c -usually expects a single argument only; you have to quote it when -passing multiple words. +the target login. .Pp Only users who are a member of group 0 (normally .Dq wheel ) @@ -204,7 +198,20 @@ as user You will be asked for man's password unless your real UID is 0. .It Li "su man -c 'catman /usr/share/man /usr/local/man /usr/X11R6/man'" Same as above, but the target command constitutes of more than a -single word. +single word and hence is quoted for use with the +.Fl c +option being passed to the shell. (Most shells expect the argument to +.Fl c +to be a single word). +.It Li "su -c staff man -c 'catman /usr/share/man /usr/local/man /usr/X11R6/man'" +Same as above, but the target command is run with the resource limits of +the login class +.Dq staff . +Note: in this example, the first +.Fl c +option applies to +.Nm +while the second is an argument to the shell being invoked. .It Li "su -l foo" Pretend a login for user .Li foo .