Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/AUTHORS coreutils-8.7/AUTHORS
Ondřej Vašík 917089
--- coreutils-8.7-orig/AUTHORS	2010-10-11 19:35:11.000000000 +0200
Ondřej Vašík 917089
+++ coreutils-8.7/AUTHORS	2010-11-15 10:08:04.222078001 +0100
Ondrej Vasik c77f9b
@@ -65,6 +65,7 @@ readlink: Dmitry V. Levin
Ondrej Vasik e18e41
 rm: Paul Rubin, David MacKenzie, Richard M. Stallman, Jim Meyering
Ondrej Vasik 893c38
 rmdir: David MacKenzie
Ondrej Vasik 893c38
 runcon: Russell Coker
Ondrej Vasik 67e264
+runuser: David MacKenzie, Dan Walsh
Ondrej Vasik 893c38
 seq: Ulrich Drepper
Ondrej Vasik 893c38
 sha1sum: Ulrich Drepper, Scott Miller, David Madore
Ondrej Vasik 67e264
 sha224sum: Ulrich Drepper, Scott Miller, David Madore
Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/man/help2man coreutils-8.7/man/help2man
Ondřej Vašík 917089
--- coreutils-8.7-orig/man/help2man	2010-10-11 19:35:11.000000000 +0200
Ondřej Vašík 917089
+++ coreutils-8.7/man/help2man	2010-11-15 10:08:51.331054884 +0100
Ondřej Vašík 917089
@@ -555,6 +555,9 @@ while (length)
Ondrej Vasik c77f9b
     $include{$sect} .= $content;
Ondrej Vasik c77f9b
 }
Ondrej Vasik c77f9b
 
Ondrej Vasik c77f9b
+# There is no info documentation for runuser (shared with su).
Ondrej Vasik c77f9b
+$opt_no_info = 1 if $program eq 'runuser';
Ondrej Vasik c77f9b
+
Ondrej Vasik c77f9b
 # Refer to the real documentation.
Ondrej Vasik c77f9b
 unless ($opt_no_info)
Ondrej Vasik c77f9b
 {
Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/man/Makefile.am coreutils-8.7/man/Makefile.am
Ondřej Vašík 917089
--- coreutils-8.7-orig/man/Makefile.am	2010-10-11 19:35:11.000000000 +0200
Ondřej Vašík 917089
+++ coreutils-8.7/man/Makefile.am	2010-11-15 10:09:21.768922182 +0100
Ondrej Vasik c77f9b
@@ -94,6 +94,7 @@ readlink.1:	$(common_dep)	$(srcdir)/read
Ondrej Vasik 893c38
 rm.1:		$(common_dep)	$(srcdir)/rm.x		../src/rm.c
Ondrej Vasik 893c38
 rmdir.1:	$(common_dep)	$(srcdir)/rmdir.x	../src/rmdir.c
Ondrej Vasik 893c38
 runcon.1:	$(common_dep)	$(srcdir)/runcon.x	../src/runcon.c
Ondrej Vasik 893c38
+runuser.1:	$(common_dep)	$(srcdir)/runuser.x	../src/su.c
Ondrej Vasik 893c38
 seq.1:		$(common_dep)	$(srcdir)/seq.x		../src/seq.c
Ondrej Vasik 893c38
 sha1sum.1:	$(common_dep)	$(srcdir)/sha1sum.x	../src/md5sum.c
Ondrej Vasik 893c38
 sha224sum.1:	$(common_dep)	$(srcdir)/sha224sum.x	../src/md5sum.c
Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/man/runuser.x coreutils-8.7/man/runuser.x
Ondřej Vašík 917089
--- coreutils-8.7-orig/man/runuser.x	1970-01-01 01:00:00.000000000 +0100
Ondřej Vašík 917089
+++ coreutils-8.7/man/runuser.x	2010-11-15 10:09:57.437939015 +0100
Kamil Dudka b26491
@@ -0,0 +1,12 @@
Kamil Dudka b26491
+[NAME]
Kamil Dudka b26491
+runuser \- run a shell with substitute user and group IDs
Kamil Dudka b26491
+[DESCRIPTION]
Kamil Dudka b26491
+.\" Add any additional description here
Kamil Dudka b26491
+[SEE ALSO]
Kamil Dudka b26491
+.TP
Kamil Dudka b26491
+More detailed Texinfo documentation could be found by command
Kamil Dudka b26491
+.TP
Ondrej Vasik 066fd3
+\t\fBinfo coreutils \(aqsu invocation\(aq\fR\t
Kamil Dudka b26491
+.TP
Ondrej Vasik 066fd3
+since the command \fBrunuser\fR is trimmed down version of command \fBsu\fR.
Kamil Dudka b26491
+.br
Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/README coreutils-8.7/README
Ondřej Vašík 917089
--- coreutils-8.7-orig/README	2010-10-11 19:35:11.000000000 +0200
Ondřej Vašík 917089
+++ coreutils-8.7/README	2010-11-15 10:10:43.002922253 +0100
Ondřej Vašík 7f6231
@@ -11,8 +11,8 @@ The programs that can be built with this
Ondrej Vasik 0363d6
   factor false fmt fold groups head hostid hostname id install join kill
Ondrej Vasik 0363d6
   link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup
Ondřej Vašík 7f6231
   nproc od paste pathchk pinky pr printenv printf ptx pwd readlink realpath
Ondřej Vašík 7f6231
-  rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred
Ondřej Vašík 7f6231
-  shuf sleep sort split stat stdbuf stty su sum sync tac tail tee test
Ondřej Vašík 7f6231
+  rm rmdir runcon runuser seq sha1sum sha224sum sha256sum sha384sum sha512sum
Ondřej Vašík 7f6231
+  shred shuf sleep sort split stat stdbuf stty su sum sync tac tail tee test
Ondřej Vašík 7f6231
   timeout touch tr true truncate tsort tty uname unexpand uniq unlink
Ondřej Vašík 7f6231
   uptime users vdir wc who whoami yes
Ondrej Vasik e18e41
 
Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/src/Makefile.am coreutils-8.7/src/Makefile.am
Ondřej Vašík 917089
--- coreutils-8.7-orig/src/Makefile.am	2010-11-15 10:07:07.339171659 +0100
Ondřej Vašík 917089
+++ coreutils-8.7/src/Makefile.am	2010-11-15 10:12:14.847094550 +0100
Ondrej Vasik c77f9b
@@ -100,6 +100,7 @@ EXTRA_PROGRAMS = \
Ondrej Vasik c77f9b
   rm		\
Ondrej Vasik c77f9b
   rmdir		\
Ondrej Vasik c77f9b
   runcon	\
Ondřej Vašík 917089
+  runuser	\
Ondrej Vasik c77f9b
   seq		\
Ondrej Vasik c77f9b
   sha1sum	\
Ondrej Vasik c77f9b
   sha224sum	\
Ondřej Vašík 917089
@@ -300,6 +301,10 @@ cp_LDADD += $(copy_LDADD)
Ondrej Vasik c77f9b
 ginstall_LDADD += $(copy_LDADD)
Ondrej Vasik c77f9b
 mv_LDADD += $(copy_LDADD)
Ondrej Vasik 893c38
 
Ondrej Vasik 893c38
+runuser_SOURCES = su.c
Ondrej Vasik 893c38
+runuser_CFLAGS = -DRUNUSER -DAUTHORS="\"David MacKenzie, Dan Walsh\""
Ondřej Vašík 917089
+runuser_LDADD = $(LDADD) $(LIB_CRYPT) $(PAM_LIBS)
Ondrej Vasik 893c38
+
Ondrej Vasik c77f9b
 remove_LDADD =
Ondrej Vasik c77f9b
 mv_LDADD += $(remove_LDADD)
Ondrej Vasik c77f9b
 rm_LDADD += $(remove_LDADD)
Ondřej Vašík 917089
@@ -395,7 +400,7 @@ RELEASE_YEAR = \
Ondrej Vasik 893c38
   `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
Ondrej Vasik 893c38
     $(top_srcdir)/lib/version-etc.c`
Ondrej Vasik 893c38
 
Ondrej Vasik 893c38
-all-local: su$(EXEEXT)
Ondrej Vasik 893c38
+all-local: su$(EXEEXT) runuser
Ondrej Vasik 893c38
 
Ondrej Vasik 893c38
 installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
Ondrej Vasik 893c38
 
Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/src/su.c coreutils-8.7/src/su.c
Ondřej Vašík 917089
--- coreutils-8.7-orig/src/su.c	2010-11-15 10:07:07.372933288 +0100
Ondřej Vašík 917089
+++ coreutils-8.7/src/su.c	2010-11-15 10:42:12.569159230 +0100
Ondřej Vašík 917089
@@ -100,9 +100,15 @@
Tim Waugh 2190ea
 #include "error.h"
Tim Waugh 2190ea
 
Ondřej Vašík bb1a46
 /* The official name of this program (e.g., no 'g' prefix).  */
Tim Waugh 2190ea
+#ifndef RUNUSER
Tim Waugh c3e4c8
 #define PROGRAM_NAME "su"
Tim Waugh 2190ea
+#else
Tim Waugh 2190ea
+#define PROGRAM_NAME "runuser"
Tim Waugh 2190ea
+#endif
Tim Waugh c3e4c8
 
Tim Waugh c3e4c8
+#ifndef AUTHORS
Ondrej Vasik 5f9af7
 #define AUTHORS proper_name ("David MacKenzie")
Tim Waugh c3e4c8
+#endif
Tim Waugh c3e4c8
 
Tim Waugh c3e4c8
 #if HAVE_PATHS_H
Tim Waugh c3e4c8
 # include <paths.h>
Ondřej Vašík 917089
@@ -140,6 +146,9 @@
Tim Waugh c3e4c8
 #ifndef USE_PAM
Ondrej Vasik c4b1fe
 char *crypt (char const *key, char const *salt);
Tim Waugh c3e4c8
 #endif
Tim Waugh c3e4c8
+#ifndef CHECKPASSWD
Tim Waugh c3e4c8
+#define CHECKPASSWD 1
Tim Waugh c3e4c8
+#endif
Ondrej Vasik 207519
 
Ondřej Vašík 917089
 static void run_shell (char const *, char const *, char **, size_t)
Ondřej Vašík 917089
      ATTRIBUTE_NORETURN;
Ondřej Vašík 917089
@@ -169,6 +178,10 @@ static struct option const longopts[] =
Tim Waugh dfdbf3
   {"login", no_argument, NULL, 'l'},
Tim Waugh dfdbf3
   {"preserve-environment", no_argument, NULL, 'p'},
Tim Waugh dfdbf3
   {"shell", required_argument, NULL, 's'},
Tim Waugh dfdbf3
+#ifdef RUNUSER
Tim Waugh dfdbf3
+  {"group", required_argument, NULL, 'g'},
Tim Waugh dfdbf3
+  {"supp-group", required_argument, NULL, 'G'},
Tim Waugh dfdbf3
+#endif
Tim Waugh dfdbf3
   {GETOPT_HELP_OPTION_DECL},
Tim Waugh dfdbf3
   {GETOPT_VERSION_OPTION_DECL},
Tim Waugh dfdbf3
   {NULL, 0, NULL, 0}
Ondrej Vasik 35cd80
@@ -444,6 +457,11 @@ correct_password (const struct passwd *p
Ondřej Vašík 917089
       retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name);
Ondřej Vašík 917089
       PAM_BAIL_P (return false);
Ondřej Vašík 917089
     }
Tim Waugh 2190ea
+#ifdef RUNUSER
Tim Waugh 2190ea
+  if (getuid() != geteuid())
Tim Waugh 2190ea
+    /* safety net: deny operation if we are suid by accident */
Ondrej Vasik 0363d6
+    error(EXIT_FAILURE, 1, "runuser may not be setuid");
Tim Waugh 2190ea
+#else
Ondřej Vašík 917089
   retval = pam_authenticate (pamh, 0);
Ondřej Vašík 917089
   PAM_BAIL_P (return false);
Ondřej Vašík 917089
   retval = pam_acct_mgmt (pamh, 0);
Ondrej Vasik 35cd80
@@ -454,6 +472,7 @@ correct_password (const struct passwd *p
Ondrej Vasik 35cd80
       PAM_BAIL_P (return false);
Ondrej Vasik 35cd80
     }
Ondrej Vasik 35cd80
   PAM_BAIL_P (return false);
Ondrej Vasik 35cd80
+#endif
Ondrej Vasik 35cd80
   /* Must be authenticated if this point was reached.  */
Ondrej Vasik 35cd80
   return true;
Ondrej Vasik 35cd80
 #else /* !USE_PAM */
Ondřej Vašík 917089
@@ -533,11 +552,22 @@ modify_environment (const struct passwd 
Tim Waugh dfdbf3
 /* Become the user and group(s) specified by PW.  */
Tim Waugh dfdbf3
 
Tim Waugh dfdbf3
 static void
Ondřej Vašík 917089
-init_groups (const struct passwd *pw)
Ondřej Vašík 917089
+init_groups (const struct passwd *pw
Tim Waugh dfdbf3
+#ifdef RUNUSER
Ondrej Vasik 250517
+                 , gid_t *groups, int num_groups
Tim Waugh dfdbf3
+#endif
Ondrej Vasik 250517
+        )
Tim Waugh dfdbf3
 {
Tim Waugh dfdbf3
 #ifdef HAVE_INITGROUPS
Tim Waugh dfdbf3
+  int rc = 0;
Tim Waugh dfdbf3
   errno = 0;
Ondřej Vašík 917089
-  if (initgroups (pw->pw_name, pw->pw_gid) == -1)
Tim Waugh dfdbf3
+#ifdef RUNUSER
Tim Waugh dfdbf3
+  if (num_groups)
Tim Waugh dfdbf3
+    rc = setgroups(num_groups, groups);
Tim Waugh dfdbf3
+  else
Tim Waugh dfdbf3
+#endif
Tim Waugh dfdbf3
+    rc = initgroups(pw->pw_name, pw->pw_gid);
Ondřej Vašík 917089
+  if (rc == -1)
Ondřej Vašík 917089
     {
Tim Waugh dfdbf3
 #ifdef USE_PAM
Ondřej Vašík 917089
       cleanup_pam (PAM_ABORT);
Ondřej Vašík 917089
@@ -639,6 +669,28 @@ usage (int status)
Ondrej Vasik 893c38
   else
Ondrej Vasik 893c38
     {
Ondrej Vasik 893c38
       printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name);
Ondrej Vasik 893c38
+#ifdef RUNUSER
Ondrej Vasik 066fd3
+      printf (_("\
Ondrej Vasik 066fd3
+Change the effective user id and group id to that of USER.  Only session PAM\n\
Ondrej Vasik 066fd3
+hooks are run, and there is no password prompt.  This command is useful only\n\
Ondrej Vasik 893c38
+when run as the root user.  If run as a non-root user without privilege\n\
Ondrej Vasik 066fd3
+to set user ID, the command will fail as the binary is not setuid.\n\
Ondrej Vasik 066fd3
+As %s doesn't run auth and account PAM hooks, it runs with lower overhead\n\
Ondrej Vasik 066fd3
+than su.\n\
Ondrej Vasik 893c38
+\n\
Ondrej Vasik 893c38
+  -, -l, --login               make the shell a login shell, uses runuser-l\n\
Ondrej Vasik 893c38
+                               PAM file instead of default one\n\
Ondrej Vasik 893c38
+  -g --group=group             specify the primary group\n\
Ondrej Vasik 893c38
+  -G --supp-group=group        specify a supplemental group\n\
Ondrej Vasik 893c38
+  -c, --command=COMMAND        pass a single COMMAND to the shell with -c\n\
Ondrej Vasik 893c38
+  --session-command=COMMAND    pass a single COMMAND to the shell with -c\n\
Ondrej Vasik 893c38
+                               and do not create a new session\n\
Ondrej Vasik 893c38
+  -f, --fast                   pass -f to the shell (for csh or tcsh)\n\
Ondrej Vasik 893c38
+  -m, --preserve-environment   do not reset environment variables\n\
Ondrej Vasik 893c38
+  -p                           same as -m\n\
Ondrej Vasik 893c38
+  -s, --shell=SHELL            run SHELL if /etc/shells allows it\n\
Ondrej Vasik 066fd3
+"), program_name);
Ondrej Vasik 893c38
+#else
Ondrej Vasik 893c38
       fputs (_("\
Ondrej Vasik 893c38
 Change the effective user id and group id to that of USER.\n\
Ondrej Vasik 893c38
 \n\
Ondřej Vašík 917089
@@ -651,6 +703,7 @@ Change the effective user id and group i
Ondrej Vasik 893c38
   -p                           same as -m\n\
Ondrej Vasik 893c38
   -s, --shell=SHELL            run SHELL if /etc/shells allows it\n\
Ondrej Vasik 893c38
 "), stdout);
Ondrej Vasik 893c38
+#endif
Ondrej Vasik 893c38
       fputs (HELP_OPTION_DESCRIPTION, stdout);
Ondrej Vasik 893c38
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
Ondrej Vasik 893c38
       fputs (_("\
Ondřej Vašík 917089
@@ -672,6 +725,12 @@ main (int argc, char **argv)
Tim Waugh dfdbf3
   char *shell = NULL;
Tim Waugh dfdbf3
   struct passwd *pw;
Tim Waugh dfdbf3
   struct passwd pw_copy;
Tim Waugh dfdbf3
+#ifdef RUNUSER
Tim Waugh dfdbf3
+  struct group *gr;
Tim Waugh dfdbf3
+  gid_t groups[NGROUPS_MAX];
Tim Waugh dfdbf3
+  int num_supp_groups = 0;
Tim Waugh dfdbf3
+  int use_gid = 0;
Tim Waugh dfdbf3
+#endif
Tim Waugh dfdbf3
 
Tim Waugh dfdbf3
   initialize_main (&argc, &argv);
Ondrej Vasik e18e41
   set_program_name (argv[0]);
Ondřej Vašík 917089
@@ -686,7 +745,11 @@ main (int argc, char **argv)
Tim Waugh dfdbf3
   simulate_login = false;
Tim Waugh dfdbf3
   change_environment = true;
Tim Waugh dfdbf3
 
Tim Waugh dfdbf3
-  while ((optc = getopt_long (argc, argv, "c:flmps:", longopts, NULL)) != -1)
Tim Waugh dfdbf3
+  while ((optc = getopt_long (argc, argv, "c:flmps:"
Tim Waugh dfdbf3
+#ifdef RUNUSER
Ondrej Vasik 250517
+                              "g:G:"
Tim Waugh dfdbf3
+#endif
Ondrej Vasik 250517
+                              , longopts, NULL)) != -1)
Tim Waugh dfdbf3
     {
Tim Waugh dfdbf3
       switch (optc)
Ondrej Vasik 250517
         {
Ondřej Vašík 917089
@@ -716,6 +779,28 @@ main (int argc, char **argv)
Ondrej Vasik 250517
           shell = optarg;
Ondrej Vasik 250517
           break;
Tim Waugh dfdbf3
 
Tim Waugh dfdbf3
+#ifdef RUNUSER
Ondrej Vasik 250517
+        case 'g':
Ondrej Vasik 250517
+          gr = getgrnam(optarg);
Ondrej Vasik 250517
+          if (!gr)
Ondrej Vasik 250517
+            error (EXIT_FAILURE, 0, _("group %s does not exist"), optarg);
Ondrej Vasik 250517
+          use_gid = 1;
Ondrej Vasik 250517
+          groups[0] = gr->gr_gid;
Ondrej Vasik 250517
+          break;
Tim Waugh dfdbf3
+
Ondrej Vasik 250517
+        case 'G':
Ondrej Vasik 250517
+          num_supp_groups++;
Ondrej Vasik 250517
+          if (num_supp_groups >= NGROUPS_MAX)
Ondrej Vasik 250517
+            error (EXIT_FAILURE, 0,
Ondrej Vasik 250517
+                   _("Can't specify more than %d supplemental groups"),
Ondrej Vasik 250517
+                   NGROUPS_MAX - 1);
Ondrej Vasik 250517
+          gr = getgrnam(optarg);
Ondrej Vasik 250517
+          if (!gr)
Ondrej Vasik 250517
+            error (EXIT_FAILURE, 0, _("group %s does not exist"), optarg);
Ondrej Vasik 250517
+          groups[num_supp_groups] = gr->gr_gid;
Ondrej Vasik 250517
+          break;
Tim Waugh dfdbf3
+#endif
Tim Waugh dfdbf3
+
Ondrej Vasik 250517
         case_GETOPT_HELP_CHAR;
Tim Waugh dfdbf3
 
Ondrej Vasik 250517
         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
Ondřej Vašík 917089
@@ -754,7 +839,20 @@ main (int argc, char **argv)
Ondrej Vasik 250517
                           : DEFAULT_SHELL);
Tim Waugh c3e4c8
   endpwent ();
Tim Waugh c3e4c8
 
Tim Waugh c3e4c8
-  if (!correct_password (pw))
Tim Waugh dfdbf3
+#ifdef RUNUSER
Tim Waugh dfdbf3
+  if (num_supp_groups && !use_gid)
Tim Waugh dfdbf3
+  {
Tim Waugh dfdbf3
+    pw->pw_gid = groups[1];
Tim Waugh dfdbf3
+    memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups);
Tim Waugh dfdbf3
+  }
Tim Waugh dfdbf3
+  else if (use_gid)
Tim Waugh dfdbf3
+  {
Tim Waugh dfdbf3
+    pw->pw_gid = groups[0];
Tim Waugh dfdbf3
+    num_supp_groups++;
Tim Waugh dfdbf3
+  }
Tim Waugh dfdbf3
+#endif
Tim Waugh dfdbf3
+
Tim Waugh c3e4c8
+  if (CHECKPASSWD && !correct_password (pw))
Tim Waugh c3e4c8
     {
Tim Waugh c3e4c8
 #ifdef SYSLOG_FAILURE
Tim Waugh c3e4c8
       log_su (pw, false);
Ondřej Vašík 917089
@@ -784,7 +882,11 @@ main (int argc, char **argv)
Ondřej Vašík 917089
     }
Ondřej Vašík 917089
   shell = xstrdup (shell ? shell : pw->pw_shell);
Tim Waugh dfdbf3
 
Ondřej Vašík 917089
-  init_groups (pw);
Ondřej Vašík 917089
+  init_groups (pw
Tim Waugh dfdbf3
+#ifdef RUNUSER
Ondrej Vasik 250517
+                   , groups, num_supp_groups
Tim Waugh dfdbf3
+#endif
Ondřej Vašík 917089
+          );
Ondrej Vasik c77f9b
 
Ondřej Vašík 917089
 #ifdef USE_PAM
Ondřej Vašík 917089
   create_watching_parent ();
Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/tests/misc/help-version coreutils-8.7/tests/misc/help-version
Ondřej Vašík 917089
--- coreutils-8.7-orig/tests/misc/help-version	2010-10-11 19:35:11.000000000 +0200
Ondřej Vašík 917089
+++ coreutils-8.7/tests/misc/help-version	2010-11-15 10:45:18.473682325 +0100
Ondřej Vašík 917089
@@ -32,6 +32,7 @@ expected_failure_status_nohup=125
Ondrej Vasik c77f9b
 expected_failure_status_stdbuf=125
Ondrej Vasik c77f9b
 expected_failure_status_su=125
Ondrej Vasik c77f9b
 expected_failure_status_timeout=125
Ondrej Vasik c77f9b
+expected_failure_status_runuser=125
Ondrej Vasik c77f9b
 expected_failure_status_printenv=2
Ondrej Vasik c77f9b
 expected_failure_status_tty=3
Ondrej Vasik c77f9b
 expected_failure_status_sort=2
Ondřej Vašík 917089
@@ -209,6 +210,7 @@ seq_setup () { args=10; }
Ondrej Vasik 12996d
 sleep_setup () { args=0; }
Ondrej Vasik 12996d
 su_setup () { args=--version; }
Ondrej Vasik 12996d
 stdbuf_setup () { args="-oL true"; }
Ondrej Vasik 12996d
+runuser_setup () { args=--version; }
Ondrej Vasik 12996d
 timeout_setup () { args=--version; }
Tim Waugh c3e4c8
 
Ondrej Vasik 893c38
 # I'd rather not run sync, since it spins up disks that I've
Ondřej Vašík 917089
diff -urNp coreutils-8.7-orig/tests/misc/invalid-opt coreutils-8.7/tests/misc/invalid-opt
Ondřej Vašík 917089
--- coreutils-8.7-orig/tests/misc/invalid-opt	2010-10-11 19:35:11.000000000 +0200
Ondřej Vašík 917089
+++ coreutils-8.7/tests/misc/invalid-opt	2010-11-15 10:45:46.451938873 +0100
Ondrej Vasik c77f9b
@@ -37,6 +37,7 @@ my %exit_status =
Ondrej Vasik c77f9b
     sort => 2,
Ondrej Vasik c77f9b
     stdbuf => 125,
Ondrej Vasik c77f9b
     su => 125,
Ondrej Vasik c77f9b
+    runuser => 125,
Ondrej Vasik c77f9b
     test => 0,
Ondrej Vasik c77f9b
     timeout => 125,
Ondrej Vasik c77f9b
     true => 0,