-k now points to an environment variable containing the password - ii - FIFO an… | |
git clone git://git.codemadness.org/ii | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c68beccf597984396c7ef22dd5b1a8eed4ab69a1 | |
parent 2bcd27c9e8bd1e4ce4da5af9218024736c1976e4 | |
Author: Nico Golde <[email protected]> | |
Date: Sat, 16 Jun 2012 17:00:31 +0200 | |
-k now points to an environment variable containing the password | |
Diffstat: | |
M CHANGES | 5 +++++ | |
M ii.1 | 9 ++++----- | |
M ii.c | 2 +- | |
3 files changed, 10 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/CHANGES b/CHANGES | |
@@ -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 --git a/ii.1 b/ii.1 | |
@@ -26,7 +26,7 @@ and ii creates a new channel directory with in and out file. | |
.RB [ \-p | |
.IR port ] | |
.RB [ \-k | |
-.IR password ] | |
+.IR environment variable ] | |
.RB [ \-i | |
.IR prefix ] | |
.RB [ \-n | |
@@ -42,10 +42,9 @@ lets you override the default servername (irc.freenode.net) | |
.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.… | |
+This is done in order to prevent other users from eavesdropping the server pas… | |
.TP | |
.BI \-i " prefix" | |
lets you override the default irc path (~/irc) | |
diff --git a/ii.c b/ii.c | |
@@ -477,7 +477,7 @@ int main(int argc, char *argv[]) { | |
case 's': host = argv[++i]; break; | |
case 'p': port = strtol(argv[++i], NULL, 10); break; | |
case 'n': snprintf(nick,sizeof(nick),"%s", argv[++i]);… | |
- case 'k': key = argv[++i]; break; | |
+ case 'k': key = getenv(argv[++i]); break; | |
case 'f': fullname = argv[++i]; break; | |
default: usage(); break; | |
} |