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, "?????",
if (!cli) {
return(False);
}
-
+
if (*base_directory) do_cd(base_directory);
if (cmdstr) {
/* 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;
{
if (!cli) {
cli = (struct cli_state *)malloc(sizeof(*cli));
- if (!cli) return NULL;
+ if (!cli)
+ return NULL;
+ ZERO_STRUCTP(cli);
}
if (cli->initialised) {
/*
* 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
chg_passwd();
}
- printf("</table>");
+ printf("</table>\n");
printf("</FORM>\n");
/*
* 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