Disable window title reporting by default, since it's a security
[u/mdw/putty] / settings.c
index f633d31..1152926 100644 (file)
@@ -141,15 +141,17 @@ static void wprefs(void *sesskey, char *name,
     write_setting_s(sesskey, name, buf);
 }
 
-void save_settings(char *section, int do_host, Config * cfg)
+char *save_settings(char *section, int do_host, Config * cfg)
 {
     void *sesskey;
+    char *errmsg;
 
-    sesskey = open_settings_w(section);
+    sesskey = open_settings_w(section, &errmsg);
     if (!sesskey)
-       return;
+       return errmsg;
     save_open_settings(sesskey, do_host, cfg);
     close_settings_w(sesskey);
+    return NULL;
 }
 
 void save_open_settings(void *sesskey, int do_host, Config *cfg)
@@ -238,6 +240,7 @@ void save_open_settings(void *sesskey, int do_host, Config *cfg)
     write_setting_i(sesskey, "NoRemoteResize", cfg->no_remote_resize);
     write_setting_i(sesskey, "NoAltScreen", cfg->no_alt_screen);
     write_setting_i(sesskey, "NoRemoteWinTitle", cfg->no_remote_wintitle);
+    write_setting_i(sesskey, "NoRemoteQTitle", cfg->no_remote_qtitle);
     write_setting_i(sesskey, "NoDBackspace", cfg->no_dbackspace);
     write_setting_i(sesskey, "NoRemoteCharset", cfg->no_remote_charset);
     write_setting_i(sesskey, "ApplicationCursorKeys", cfg->app_cursor);
@@ -470,6 +473,7 @@ void load_open_settings(void *sesskey, int do_host, Config *cfg)
     gppi(sesskey, "NoRemoteResize", 0, &cfg->no_remote_resize);
     gppi(sesskey, "NoAltScreen", 0, &cfg->no_alt_screen);
     gppi(sesskey, "NoRemoteWinTitle", 0, &cfg->no_remote_wintitle);
+    gppi(sesskey, "NoRemoteQTitle", 1, &cfg->no_remote_qtitle);
     gppi(sesskey, "NoDBackspace", 0, &cfg->no_dbackspace);
     gppi(sesskey, "NoRemoteCharset", 0, &cfg->no_remote_charset);
     gppi(sesskey, "ApplicationCursorKeys", 0, &cfg->app_cursor);