public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] su: Remove the impossible -C option to request the same session.
@ 2013-11-18 14:44 Colin Guthrie
  2013-11-18 16:42 ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Guthrie @ 2013-11-18 14:44 UTC (permalink / raw)
  To: util-linux; +Cc: Colin Guthrie

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] su: Remove the impossible -C option to request the same session.
  2013-11-18 14:44 [PATCH] su: Remove the impossible -C option to request the same session Colin Guthrie
@ 2013-11-18 16:42 ` Karel Zak
  2013-11-18 17:41   ` Colin Guthrie
  0 siblings, 1 reply; 3+ messages in thread
From: Karel Zak @ 2013-11-18 16:42 UTC (permalink / raw)
  To: Colin Guthrie; +Cc: util-linux

On Mon, Nov 18, 2013 at 02:44:00PM +0000, Colin Guthrie wrote:
> It's impossible to pass this argument so it is pointless to keep the
> code to support it.

 Really? See struct option longopts[] and --session-command.

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] su: Remove the impossible -C option to request the same session.
  2013-11-18 16:42 ` Karel Zak
@ 2013-11-18 17:41   ` Colin Guthrie
  0 siblings, 0 replies; 3+ messages in thread
From: Colin Guthrie @ 2013-11-18 17:41 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

'Twas brillig, and Karel Zak at 18/11/13 16:42 did gyre and gimble:
> On Mon, Nov 18, 2013 at 02:44:00PM +0000, Colin Guthrie wrote:
>> It's impossible to pass this argument so it is pointless to keep the
>> code to support it.
> 
>  Really? See struct option longopts[] and --session-command.

Gah, sorry! Could have sworn I'd searched for the 'C' but must have been
fat fingers while on a bumpy train.

Sorry 'bout that.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-18 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-18 14:44 [PATCH] su: Remove the impossible -C option to request the same session Colin Guthrie
2013-11-18 16:42 ` Karel Zak
2013-11-18 17:41   ` Colin Guthrie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox