.cvsignore: Removed old entries.
authorHerb Lewis <herb@samba.org>
Thu, 12 Nov 1998 22:17:51 +0000 (22:17 +0000)
committerHerb Lewis <herb@samba.org>
Thu, 12 Nov 1998 22:17:51 +0000 (22:17 +0000)
client/client.c:
include/client.h: Added some debug messages that the old client used to
  generate. These are needed to make scripts such as
  'findsmb' work - there may be other changes to keep
  backwards output compatibility. Do we need a -old-client-compat
  argument ?
libsmb/clientgen.c: Fixed crash bug where malloc'ed data wasn't being
    cleared - corrupted malloc chains.
web/swat.c: John's changes to get rid of "ghost" table entries.

source/.cvsignore
source/client/client.c
source/include/client.h
source/libsmb/clientgen.c
source/web/swat.c

index 7d823233f55ba87fa55eb364645e8829727fbdf6..247b980fa8dae1fa22de5514860b54ff3de5cc30 100644 (file)
@@ -1,36 +1,8 @@
-.deps
 bin
 Makefile
-Makefile.RPM
-config
 config.cache
 config.h
 config.log
 config.status
 cvs.log
-d2
-make_printerdef
-make_smbcodepage
-makefile
-makefile.sunos5
-memcheck.awk
-nmbd
-nmblookup
-nmfns.txt
-nmlist.txt
-nmused.txt
-notes.txt
-smbclient
-smbd
-smbpasswd
-smbrun
-smbstatus
-smbtorture
-swat
-testparm
-testprns
-text.txt
-unused.txt
-wsmbconf
-wsmbstatus
-*.p
+so_locations
index e23875fc1b537089c82fe9e037c9433c48d87251..185919bf5f92d79446b6cfd930abb05780feb83c 100644 (file)
@@ -1685,6 +1685,18 @@ struct cli_state *do_connect(char *server, char *share)
                return NULL;
        }
 
+       /*
+        * These next two lines are needed to emulate
+        * old client behaviour for people who have
+        * scripts based on client output.
+        * QUESTION ? Do we want to have a 'client compatibility
+        * mode to turn these on/off ? JRA.
+        */
+
+       if (*c->server_domain || *c->server_os || *c->server_name)
+               DEBUG(1,("Domain=[%s] OS=[%s] Server=[%s]\n",
+                       c->server_domain,c->server_os,c->server_name));
+       
        DEBUG(4,(" session setup ok\n"));
 
        if (!cli_send_tconX(c, share, "?????",
@@ -1710,7 +1722,7 @@ static BOOL process(char *base_directory)
        if (!cli) {
                return(False);
        }
-       
+
        if (*base_directory) do_cd(base_directory);
        
        if (cmdstr) {
index 0d5d2ea8fb0020e6720d80db0797910cf91b491a..0f28fa0d089bd35c33b743254368b53fe62d89eb 100644 (file)
@@ -87,6 +87,15 @@ struct cli_state {
        fstring user_name;
        fstring domain;
 
+       /*
+        * The following strings are the
+        * ones returned by the server if
+        * the protocol > NT1.
+        */
+       fstring server_type;
+       fstring server_os;
+       fstring server_domain;
+
        fstring share;
        fstring dev;
        struct nmb_name called;
index b4ca7a1d77713ad69128b55e9883084e85ff50d4..4eaebfa6ed21097bb1af24c6c3a9a20a66b052ca 100644 (file)
@@ -772,6 +772,20 @@ BOOL cli_session_setup(struct cli_state *cli,
       /* use the returned vuid from now on */
       cli->vuid = SVAL(cli->inbuf,smb_uid);
 
+      if (cli->protocol >= PROTOCOL_NT1) {
+        /*
+         * Save off some of the connected server
+         * info.
+         */
+        char *server_domain,*server_os,*server_type;
+        server_os = smb_buf(cli->inbuf);
+        server_type = skip_string(server_os,1);
+        server_domain = skip_string(server_type,1);
+        fstrcpy(cli->server_os, server_os);
+        fstrcpy(cli->server_type, server_type);
+        fstrcpy(cli->server_domain, server_domain);
+      }
+
       fstrcpy(cli->user_name, user);
 
       return True;
@@ -2349,7 +2363,9 @@ struct cli_state *cli_initialise(struct cli_state *cli)
 {
        if (!cli) {
                cli = (struct cli_state *)malloc(sizeof(*cli));
-               if (!cli) return NULL;
+               if (!cli)
+                       return NULL;
+               ZERO_STRUCTP(cli);
        }
 
        if (cli->initialised) {
index c2e5ea560ef8b74aab8bb4a4e819473075852389..ecfc480395c750a573b47e417a9dd653c8ea40da 100644 (file)
@@ -702,25 +702,26 @@ static void passwd_page(void)
        /* 
         * Create all the dialog boxes for data collection
         */
-       printf("<p> User Name        : <input type=text size=30 name=%s value=%s> \n", 
-              USER, new_name);
+       printf("<tr><td> User Name : </td>\n");
+       printf("<td><input type=text size=30 name=%s value=%s></td></tr> \n", USER, new_name);
        if (am_root() == False) {
-               printf("<p> Old Password: <input type=password size=30 name=%s>\n",OLD_PSWD);
+               printf("<tr><td> Old Password : </td>\n");
+               printf("<td><input type=password size=30 name=%s></td></tr> \n",OLD_PSWD);
        }
-       printf("<p> New Password: <input type=password size=30 name=%s>\n",NEW_PSWD);
-       printf("<p> Re-type New Password: <input type=password size=30 name=%s>\n",NEW2_PSWD);
+       printf("<tr><td> New Password : </td>\n");
+       printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD);
+       printf("<tr><td> Re-type New Password : </td>\n");
+       printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD);
 
        /*
         * Create all the control buttons for requesting action
         */
-       printf("<p><tr><td>");
-       printf("<input type=submit name=%s value=\"Change Password\">", CHG_S_PASSWD_FLAG);
+       printf("<tr><td><input type=submit name=%s value=\"Change Password\"></td></tr>\n", CHG_S_PASSWD_FLAG);
        if (am_root() == True) {
-               printf("<input type=submit name=%s value=\"Add New User\">", ADD_USER_FLAG);
-               printf("<input type=submit name=%s value=\"Disable User\">", DISABLE_USER_FLAG);
-               printf("<input type=submit name=%s value=\"Enable User\">", ENABLE_USER_FLAG);
+               printf("<tr><td><input type=submit name=%s value=\"Add New User\"></td></tr>\n", ADD_USER_FLAG);
+               printf("<tr><td><input type=submit name=%s value=\"Disable User\"></td></tr>\n", DISABLE_USER_FLAG);
+               printf("<tr><td><input type=submit name=%s value=\"Enable User\"></td></tr>\n", ENABLE_USER_FLAG);
        }
-       printf("</td></tr>\n");
 
        /*
         * Do some work if change, add, disable or enable was requested. It could be
@@ -731,7 +732,7 @@ static void passwd_page(void)
                chg_passwd();           
        }
 
-       printf("</table>");
+       printf("</table>\n");
 
        printf("</FORM>\n");
 
@@ -744,19 +745,21 @@ static void passwd_page(void)
        /* 
         * Create all the dialog boxes for data collection
         */
-       printf("<p> User Name        : <input type=text size=30 name=%s value=%s> \n", 
-              USER, new_name);
-       printf("<p> Old Password: <input type=password size=30 name=%s>\n",OLD_PSWD);
-       printf("<p> New Password: <input type=password size=30 name=%s>\n",NEW_PSWD);
-       printf("<p> Re-type New Password: <input type=password size=30 name=%s>\n",NEW2_PSWD);
-       printf("<p> Remote Machine: <input type=password size=30 name=%s>\n",RHOST);
+       printf("<tr><td> User Name : </td>\n");
+       printf("<td><input type=text size=30 name=%s value=%s></td></tr>\n",USER, new_name);
+       printf("<tr><td> Old Password : </td>\n");
+       printf("<td><input type=password size=30 name=%s></td></tr>\n",OLD_PSWD);
+       printf("<tr><td> New Password : </td>\n");
+       printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD);
+       printf("<tr><td> Re-type New Password : </td>\n");
+       printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD);
+       printf("<tr><td> Remote Machine : </td>\n");
+       printf("<td><input type=password size=30 name=%s></td></tr>\n",RHOST);
 
        /*
         * Create all the control buttons for requesting action
         */
-       printf("<p><tr><td>");
-       printf("<input type=submit name=%s value=\"Change Password\">", CHG_R_PASSWD_FLAG);
-       printf("</td></tr>\n");
+       printf("<tr><td><input type=submit name=%s value=\"Change Password\"></td></tr>", CHG_R_PASSWD_FLAG);
 
        /*
         * Do some work if a request has been made to change the password somewhere other