From a2d2206cc941f39df8713d9cee26099f603af82f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Sep 1997 17:12:08 +0000 Subject: Makefile: Changed proto: target to not include c files not used currently. Caused proto.h to be from a sorted list of C files. arcfour.h: Added prototypes. client.c: Added username%password in environment patch from John Blair loadparm.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au] username.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au] mkproto.awk: Added arc4_key type. proto.h: Updated & sorted. Jeremy (jallison@whistle.com) (This used to be commit 97ed4fea67095dfb83227e7b5fffc236ff277e02) --- source3/client/client.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'source3/client/client.c') diff --git a/source3/client/client.c b/source3/client/client.c index da4acbb855..275d03ddba 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4418,6 +4418,7 @@ static void usage(char *pname) extern char tar_type; static pstring servicesf = CONFIGFILE; pstring term_code; + char *p; #ifdef KANJI strcpy(term_code, KANJI); @@ -4443,10 +4444,27 @@ static void usage(char *pname) umask(myumask); if (getenv("USER")) + { + strcpy(username,getenv("USER")); + + /* modification to support userid%passwd syntax in the USER var + 25.Aug.97, jdblair@uab.edu */ + + if ((p=strchr(username,'%'))) { - strcpy(username,getenv("USER")); - strupper(username); + *p = 0; + strcpy(password,p+1); + got_pass = True; + memset(strchr(getenv("USER"),'%')+1,'X',strlen(password)); } + strupper(username); + } + + /* modification to support PASSWD environmental var + 25.Aug.97, jdblair@uab.edu */ + + if (getenv("PASSWD")) + strcpy(password,getenv("PASSWD")); if (*username == 0 && getenv("LOGNAME")) { -- cgit