Date: Mon, 20 May 2002 00:09:48 +0200 (CEST) From: Jens Schweikhardt <schweikh@schhweikhardt.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/38308: su(1) prints bogus help message; inconsistent man page Message-ID: <200205192209.g4JM9mCd067780@hal9000.schweikhardt.net>
next in thread | raw e-mail | index | archive | help
>Number: 38308
>Category: bin
>Synopsis: su(1) prints bogus help message; inconsistent man page
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun May 19 15:30:09 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Jens Schweikhardt
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
Digital Details
>Environment:
System: FreeBSD hal9000.schweikhardt.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed May 1 14:49:52 CEST 2002 toor@hal9000.schweikhardt.net:/usr/obj/src/current/sys/HAL9000 i386
>Description:
su(1) prints bogus help message; there is no --help option:
root@hal9000:/home/schweikh # /usr/bin/su uucp -c ls
Usage: su [options]
Use su --help for help
root@hal9000:/home/schweikh # /usr/bin/su --help
# <-- huh? A shell prompt...
The man page says:
SYNOPSIS
su [-] [-flm] [-c class] [login [args]]
...
-c class
Use the settings of the specified login class. Only allowed for
the super-user.
...
EXAMPLES
su man -c catman
Runs the command catman as user man. You will be asked for man's
password unless your real UID is 0.
su man -c 'catman /usr/share/man /usr/local/man /usr/X11R6/man'
Same as above, but the target command consists of more than a sin-
gle word and hence is quoted for use with the -c option being
passed to the shell. (Most shells expect the argument to -c to be
a single word).
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 ``staff''. Note: in this example, the
first -c option applies to su while the second is an argument to
the shell being invoked.
It seems -c is used in the examples to specify a command AND a class.
>How-To-Repeat:
See above.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205192209.g4JM9mCd067780>
