public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Colin Guthrie <colin@mageia.org>
To: util-linux@vger.kernel.org
Cc: Colin Guthrie <colin@mageia.org>
Subject: [PATCH] su: Remove the impossible -C option to request the same session.
Date: Mon, 18 Nov 2013 14:44:00 +0000	[thread overview]
Message-ID: <1384785840-31957-1-git-send-email-colin@mageia.org> (raw)

It's impossible to pass this argument so it is pointless to keep the
code to support it.
---
 login-utils/su-common.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/login-utils/su-common.c b/login-utils/su-common.c
index 7fd2792..ca9f24b 100644
--- a/login-utils/su-common.c
+++ b/login-utils/su-common.c
@@ -744,7 +744,6 @@ su_main (int argc, char **argv, int mode)
   int optc;
   const char *new_user = DEFAULT_USER, *runuser_user = NULL;
   char *command = NULL;
-  int request_same_session = 0;
   char *shell = NULL;
   struct passwd *pw;
   struct passwd pw_copy;
@@ -786,11 +785,6 @@ su_main (int argc, char **argv, int mode)
 	  command = optarg;
 	  break;
 
-        case 'C':
-          command = optarg;
-          request_same_session = 1;
-          break;
-
 	case 'f':
 	  fast_startup = true;
 	  break;
@@ -924,7 +918,7 @@ su_main (int argc, char **argv, int mode)
 
   authenticate (pw);
 
-  if (request_same_session || !command || !pw->pw_uid)
+  if (!command || !pw->pw_uid)
     same_session = 1;
 
   /* initialize shell variable only if "-u <user>" not specified */
-- 
1.8.4.3


             reply	other threads:[~2013-11-18 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-18 14:44 Colin Guthrie [this message]
2013-11-18 16:42 ` [PATCH] su: Remove the impossible -C option to request the same session Karel Zak
2013-11-18 17:41   ` Colin Guthrie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384785840-31957-1-git-send-email-colin@mageia.org \
    --to=colin@mageia.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox