From 066fd3a5cb990132d97eacc4fff0da46fdd322e4 Mon Sep 17 00:00:00 2001 From: Ondrej Vasik Date: Tue, 22 Sep 2009 13:24:02 +0000 Subject: [PATCH] improve and correct runuser documentation (#524805) --- coreutils-5.2.1-runuser.patch | 31 +++++++++++++++++++++++-------- coreutils.spec | 5 ++++- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/coreutils-5.2.1-runuser.patch b/coreutils-5.2.1-runuser.patch index f78cbc0..5600d2f 100644 --- a/coreutils-5.2.1-runuser.patch +++ b/coreutils-5.2.1-runuser.patch @@ -32,9 +32,9 @@ diff -urNp coreutils-7.0.orig/man/runuser.x coreutils-7.0/man/runuser.x +.TP +More detailed Texinfo documentation could be found by command +.TP -+\t\fBinfo su invocation\fR\t ++\t\fBinfo coreutils \(aqsu invocation\(aq\fR\t +.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 diff -urNp coreutils-7.0.orig/README coreutils-7.0/README --- 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); if (!same_session) setsid (); -@@ -620,6 +665,26 @@ usage (int status) +@@ -620,6 +665,28 @@ usage (int status) else { printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name); +#ifdef RUNUSER -+ fputs (_("\ -+Change the effective user id and group id to that of USER. No PAM hooks\n\ -+are run, and there will be no password prompt. This command is useful\n\ ++ printf (_("\ ++Change the effective user id and group id to that of USER. Only session PAM\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\ -+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\ + -, -l, --login make the shell a login shell, uses runuser-l\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\ + -p same as -m\n\ + -s, --shell=SHELL run SHELL if /etc/shells allows it\n\ -+"), stdout); ++"), program_name); +#else fputs (_("\ 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 # 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) + { diff --git a/coreutils.spec b/coreutils.spec index 4e72eb1..06648b5 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 7.6 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -329,6 +329,9 @@ fi %{_libdir}/coreutils %changelog +* Tue Sep 22 2009 Ondrej Vasik - 7.6-5 +- improve and correct runuser documentation (#524805) + * Mon Sep 21 2009 Ondrej Vasik - 7.6-4 - add dircolors color for GNU lzip (#516897)