[hackers] [ii] -k now points to an environment variable containing the password || Nico Golde

From: <hg_AT_suckless.org>
Date: Sat, 16 Jun 2012 17:00:44 +0200 (CEST)

changeset: 95:1fc809a84074
tag: tip
user: Nico Golde <nion_AT_suckless.org>
date: Sat Jun 16 17:00:31 2012 +0200
files: CHANGES ii.1 ii.c
description:
-k now points to an environment variable containing the password


diff -r d163c8917af7 -r 1fc809a84074 CHANGES
--- a/CHANGES Mon Oct 31 21:35:12 2011 +0100
+++ b/CHANGES Sat Jun 16 17:00:31 2012 +0200
_AT_@ -1,3 +1,8 @@
+1.7 (20XX-XX-XX)
+ - -k now specifies an environment variable that contains the
+ server key. This behaviour has been changed in order to not
+ expose the password in the process list.
+
 1.6 (2011-01-31):
     - fix regression introduced for handling unknown commands
 
diff -r d163c8917af7 -r 1fc809a84074 ii.1
--- a/ii.1 Mon Oct 31 21:35:12 2011 +0100
+++ b/ii.1 Sat Jun 16 17:00:31 2012 +0200
_AT_@ -26,7 +26,7 @@
 .RB [ \-p
 .IR port ]
 .RB [ \-k
-.IR password ]
+.IR environment variable ]
 .RB [ \-i
 .IR prefix ]
 .RB [ \-n
_AT_@ -42,10 +42,9 @@
 .BI \-p " port"
 lets you override the default port (6667)
 .TP
-.BI \-k " password"
-lets you use a password to authenticate your nick on the server
-(be aware of the problem that this is visible in the process list, if you
-don't want this use a query to submit your password)
+.BI \-k " environment variable"
+lets you specify an environment variable that contains your IRC password, e.g. IIPASS="foobar" ii -k FOOBAR.
+This is done in order to prevent other users from eavesdropping the server password via the process list.
 .TP
 .BI \-i " prefix"
 lets you override the default irc path (~/irc)
diff -r d163c8917af7 -r 1fc809a84074 ii.c
--- a/ii.c Mon Oct 31 21:35:12 2011 +0100
+++ b/ii.c Sat Jun 16 17:00:31 2012 +0200
_AT_@ -477,7 +477,7 @@
                         case 's': host = argv[++i]; break;
                         case 'p': port = strtol(argv[++i], NULL, 10); break;
                         case 'n': snprintf(nick,sizeof(nick),"%s", argv[++i]); break;
- case 'k': key = argv[++i]; break;
+ case 'k': key = getenv(argv[++i]); break;
                         case 'f': fullname = argv[++i]; break;
                         default: usage(); break;
                 }
Received on Sat Jun 16 2012 - 17:00:44 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 16 2012 - 17:12:08 CEST