summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-09-19 17:12:08 +0000
committerJeremy Allison <jra@samba.org>1997-09-19 17:12:08 +0000
commita2d2206cc941f39df8713d9cee26099f603af82f (patch)
treed438f8496920c07242d3c839767711c0a1e8d58c /source3/client/client.c
parent1aa8036b451412c00503a791ae6e0600491b2ca0 (diff)
downloadsamba-a2d2206cc941f39df8713d9cee26099f603af82f.tar.gz
samba-a2d2206cc941f39df8713d9cee26099f603af82f.tar.bz2
samba-a2d2206cc941f39df8713d9cee26099f603af82f.zip
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 <jdblair@frodo.tucc.uab.edu> 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)
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c22
1 files changed, 20 insertions, 2 deletions
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"))
{