simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Apr 13 19:22:54 BST 2019


TL;DR:
  39c20d48 Revert "settings.c: allow load_open_settings(NULL)."
  2692bfe8 provide_xrm_string: make argument type const char *.
  56198afb provide_xrm_string: report a more sensible program name.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-04-13 19:22:54

commit 39c20d4819794417e4e84429d1eb5430e3865b25
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=39c20d4819794417e4e84429d1eb5430e3865b25;hp=b5597cc833e105c070c028c8e8f91a93ebcdcf24
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Apr 13 18:52:28 2019 +0100

    Revert "settings.c: allow load_open_settings(NULL)."
    
    This reverts commit 1b2f39c24bb6591a4192377d9393f5c3e45cb5bd.
    
    The intention of that commit was to support the development of Uppity,
    by arranging that I could get a Conf populated with completely default
    values by calling load_open_settings(NULL,conf), with no risk of
    interference from the normal PuTTY saved sessions full of client-side
    configuration (which would have been confusing to apply unexpectedly
    in a server).
    
    So I arranged that a NULL session handle was never passed to the
    low-level read_setting_[type] functions, in case it caused a segfault.
    But I overlooked two things.
    
    Firstly, on Unix, read_setting_* is where we check the tree234 of data
    derived from X resources and/or -xrm command-line options. So if you
    don't call those functions at all (e.g. if you have no on-disk PuTTY
    saved configuration at all, not even Default Settings), you also don't
    get your X defaults honoured.
    
    Secondly, those functions themselves already all checked their
    argument for NULL before doing anything dangerous with it. So the
    thing I wanted to make possible was already possible _anyway_, without
    me having to do anything!
    
    So I'm exactly reverting that commit, because the _only_ thing it did
    was to introduce a bug in X resource handling.

 settings.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

commit 2692bfe8eec8f8a78299ae9161dc55f3a515944e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2692bfe8eec8f8a78299ae9161dc55f3a515944e;hp=39c20d4819794417e4e84429d1eb5430e3865b25
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Apr 13 19:09:56 2019 +0100

    provide_xrm_string: make argument type const char *.
    
    All call sites so far have happened to pass it a mutable string, but
    it doesn't actually need one.

 unix/unix.h    | 2 +-
 unix/uxstore.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

commit 56198afb5c1f5e5ce606f45c6e214073c75c9901
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=56198afb5c1f5e5ce606f45c6e214073c75c9901;hp=2692bfe8eec8f8a78299ae9161dc55f3a515944e
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Apr 13 19:12:53 2019 +0100

    provide_xrm_string: report a more sensible program name.
    
    It was always issuing an error message beginning "pterm:", even when
    the application was GTK PuTTY or Unix Plink.

 unix/gtkmain.c | 2 +-
 unix/unix.h    | 2 +-
 unix/uxplink.c | 6 +++++-
 unix/uxstore.c | 6 +++---
 4 files changed, 10 insertions(+), 6 deletions(-)



More information about the tartarus-commits mailing list