improve and correct runuser documentation (#524805)

This commit is contained in:
Ondrej Vasik 2009-09-22 13:24:02 +00:00
parent 2277f1a25d
commit 066fd3a5cb
2 changed files with 27 additions and 9 deletions

View File

@ -32,9 +32,9 @@ diff -urNp coreutils-7.0.orig/man/runuser.x coreutils-7.0/man/runuser.x
+.TP +.TP
+More detailed Texinfo documentation could be found by command +More detailed Texinfo documentation could be found by command
+.TP +.TP
+\t\fBinfo su invocation\fR\t +\t\fBinfo coreutils \(aqsu invocation\(aq\fR\t
+.TP +.TP
+since the command \fBrunuser\fR is trimmed down version of command \fBrunuser\fR. +since the command \fBrunuser\fR is trimmed down version of command \fBsu\fR.
+.br +.br
diff -urNp coreutils-7.0.orig/README coreutils-7.0/README diff -urNp coreutils-7.0.orig/README coreutils-7.0/README
--- coreutils-7.0.orig/README 2008-08-24 22:30:10.000000000 +0200 --- coreutils-7.0.orig/README 2008-08-24 22:30:10.000000000 +0200
@ -224,16 +224,18 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c
pam_end(pamh, 0); pam_end(pamh, 0);
if (!same_session) if (!same_session)
setsid (); setsid ();
@@ -620,6 +665,26 @@ usage (int status) @@ -620,6 +665,28 @@ usage (int status)
else else
{ {
printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name); printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name);
+#ifdef RUNUSER +#ifdef RUNUSER
+ fputs (_("\ + printf (_("\
+Change the effective user id and group id to that of USER. No PAM hooks\n\ +Change the effective user id and group id to that of USER. Only session PAM\n\
+are run, and there will be no password prompt. This command is useful\n\ +hooks are run, and there is no password prompt. This command is useful only\n\
+when run as the root user. If run as a non-root user without privilege\n\ +when run as the root user. If run as a non-root user without privilege\n\
+to set user ID, the command will fail.\n\ +to set user ID, the command will fail as the binary is not setuid.\n\
+As %s doesn't run auth and account PAM hooks, it runs with lower overhead\n\
+than su.\n\
+\n\ +\n\
+ -, -l, --login make the shell a login shell, uses runuser-l\n\ + -, -l, --login make the shell a login shell, uses runuser-l\n\
+ PAM file instead of default one\n\ + PAM file instead of default one\n\
@ -246,7 +248,7 @@ diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c
+ -m, --preserve-environment do not reset environment variables\n\ + -m, --preserve-environment do not reset environment variables\n\
+ -p same as -m\n\ + -p same as -m\n\
+ -s, --shell=SHELL run SHELL if /etc/shells allows it\n\ + -s, --shell=SHELL run SHELL if /etc/shells allows it\n\
+"), stdout); +"), program_name);
+#else +#else
fputs (_("\ fputs (_("\
Change the effective user id and group id to that of USER.\n\ Change the effective user id and group id to that of USER.\n\
@ -366,3 +368,16 @@ diff -urNp coreutils-7.5.orig/tests/misc/help-version coreutils-7.5/tests/misc/h
timeout_args=--version timeout_args=--version
# I'd rather not run sync, since it spins up disks that I've # I'd rather not run sync, since it spins up disks that I've
diff -urNp coreutils-7.6-orig/man/help2man coreutils-7.6/man/help2man
--- coreutils-7.6-orig/man/help2man 2009-09-01 13:01:16.000000000 +0200
+++ coreutils-7.6/man/help2man 2009-09-22 15:15:01.000000000 +0200
@@ -550,6 +550,9 @@ while (length)
$include{$sect} .= $content;
}
+# There is no info documentation for runuser (shared with su).
+$opt_no_info = 1 if $program eq 'runuser';
+
# Refer to the real documentation.
unless ($opt_no_info)
{

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils Name: coreutils
Version: 7.6 Version: 7.6
Release: 4%{?dist} Release: 5%{?dist}
License: GPLv3+ License: GPLv3+
Group: System Environment/Base Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/ Url: http://www.gnu.org/software/coreutils/
@ -329,6 +329,9 @@ fi
%{_libdir}/coreutils %{_libdir}/coreutils
%changelog %changelog
* Tue Sep 22 2009 Ondrej Vasik <ovasik@redhat.com> - 7.6-5
- improve and correct runuser documentation (#524805)
* Mon Sep 21 2009 Ondrej Vasik <ovasik@redhat.com> - 7.6-4 * Mon Sep 21 2009 Ondrej Vasik <ovasik@redhat.com> - 7.6-4
- add dircolors color for GNU lzip (#516897) - add dircolors color for GNU lzip (#516897)