From d684d276fbeb9a4f53840df8a47f6ca6ede8bd55 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 5 Sep 1997 21:49:07 +0000 Subject: client.c: status.c: Ensure that myhostname is set so that substitutions work. server.c: Sync up with main branch. Jermey (jallison@whistle.com) --- source/client/client.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/client/client.c') diff --git a/source/client/client.c b/source/client/client.c index 329956ce94b..4718db84ac0 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -34,6 +34,7 @@ pstring cd_path = ""; pstring service=""; pstring desthost=""; extern pstring myname; +extern pstring myhostname; pstring password = ""; pstring username=""; pstring workgroup=""; @@ -4625,6 +4626,11 @@ static void usage(char *pname) DEBUG(3,("%s client started (version %s)\n",timestring(),VERSION)); + if(!get_myname(myhostname,NULL)) + { + DEBUG(0,("Failed to get my hostname.\n")); + } + if (!lp_load(servicesf,True)) { fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf); } -- cgit From 8d53b35f22efabc79cc9d569875353501e900d60 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 16 Oct 1997 07:54:52 +0000 Subject: add ERRDOS/67 ERRnosuchshare to the client.c list of error strings --- source/client/client.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/client/client.c') diff --git a/source/client/client.c b/source/client/client.c index 4718db84ac0..cd9e8d1c97c 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -4765,6 +4765,7 @@ err_code_struct dos_msgs[] = { {"ERRnofiles",18,"A File Search command can find no more files matching the specified criteria."}, {"ERRbadshare",32,"The sharing mode specified for an Open conflicts with existing FIDs on the file."}, {"ERRlock",33,"A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process."}, + {"ERRnosuchshare", 67, "You specified an invalid share name"}, {"ERRfilexists",80,"The file named in a Create Directory, Make New File or Link request already exists."}, {"ERRbadpipe",230,"Pipe invalid."}, {"ERRpipebusy",231,"All instances of the requested pipe are busy."}, -- cgit From 9caab6bec07230ecc80aada0881f6978f28c58a8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 21 Oct 1997 10:09:30 +0000 Subject: add the new password server code to the 1.9.17 tree. This needed to be fixed as the previous code could provide a security hole if the NT server was misconfigured --- source/client/client.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'source/client/client.c') diff --git a/source/client/client.c b/source/client/client.c index cd9e8d1c97c..a48d1b4990b 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -3411,6 +3411,13 @@ static BOOL send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setu uid = SVAL(inbuf,smb_uid); } + if (SVAL(inbuf, smb_vwv2) & 1) + DEBUG(1,("connected as guest ")); + if (sec_mode & 1) + DEBUG(1,("security=user\n")); + else + DEBUG(1,("security=share\n")); + /* now we've got a connection - send a tcon message */ bzero(outbuf,smb_size); @@ -3520,6 +3527,7 @@ static BOOL send_login(char *inbuf,char *outbuf,BOOL start_session,BOOL use_setu free(inbuf); free(outbuf); } + return True; } @@ -3693,6 +3701,7 @@ static BOOL send_trans_request(char *outbuf,int trans, return(True); } + /**************************************************************************** try and browse available connections on a host ****************************************************************************/ @@ -4118,7 +4127,7 @@ static BOOL open_sockets(int port ) strcpy(desthost,host); } - if (*myname == 0) { + if (!(*myname)) { get_myname(myname,NULL); } strupper(myname); @@ -4639,7 +4648,7 @@ static void usage(char *pname) strcpy(workgroup,lp_workgroup()); load_interfaces(); - get_myname(*myname?NULL:myname,NULL); + get_myname((*myname)?NULL:myname,NULL); strupper(myname); if (tar_type) { -- cgit