simon-git: putty (pre-0.78): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Sep 18 15:17:27 BST 2022


TL;DR:
  b0a61849 Unix GSSAPI: support krb5-config as well as pkg-config.
  374107eb Unix static GSSAPI: fix an uninitialised structure field.
  35a87984 Unix GSSAPI: support static linking against Heimdal.
  a95e38e9 GSSAPI fix: don't pass GSS_C_NO_NAME to inquire_cred_by_mech.
  732ec31a Add explicit cmake setting for 'build without GTK'.
  fda41e19 Add cmake check for whether setpgrp takes arguments.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: pre-0.78
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2022-09-18 15:17:26

commit b0a61849efb3cbf0f1c0fead0f422341a969458c
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b0a61849efb3cbf0f1c0fead0f422341a969458c;hp=e1b73f0d54b878ee6c02d2eb76028732a8510dc3
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 17 07:53:43 2022 +0100

    Unix GSSAPI: support krb5-config as well as pkg-config.
    
    On FreeBSD, I'm told, you can't configure Kerberos via pkg-config. So
    we need a fallback. Here's some manual code to run krb5-config and
    pick apart the result, similar to what I already did with gtk-config
    for our (still not dead!) GTK 1 support.

 cmake/platforms/unix.cmake | 63 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 62 insertions(+), 1 deletion(-)

commit 374107eb1e2ae576c10cdd538f45f18918df8c4b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=374107eb1e2ae576c10cdd538f45f18918df8c4b;hp=b0a61849efb3cbf0f1c0fead0f422341a969458c
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 17 07:09:29 2022 +0100

    Unix static GSSAPI: fix an uninitialised structure field.
    
    When linking statically against Kerberos, the setup code in
    ssh_got_ssh_version() was trying to look up want_id==0 in the list of
    one GSSAPI library, but unfortunately, the id field of that record was
    not initialised at all, so if it happened to be nonzero nonsense, the
    loop wouldn't find a library at all and would fail an assertion.

 unix/gss.c | 1 +
 1 file changed, 1 insertion(+)

commit 35a87984f67ebc2db3f670cb1431f08991853a5e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=35a87984f67ebc2db3f670cb1431f08991853a5e;hp=374107eb1e2ae576c10cdd538f45f18918df8c4b
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 17 07:28:46 2022 +0100

    Unix GSSAPI: support static linking against Heimdal.
    
    Heimdal provides its own definitions of OIDs like GSS_C_NT_USER_NAME
    in the form of macros, which conflict with our attempt to redefine
    them as variables - the macro gets expanded into the middle of the
    variable declaration, leaving the poor C compiler trying to parse a
    non-declaration along the lines of
    
    const_gss_OID (&__gss_c_nt_anonymous_oid_desc) = oids+5;
    
    Easily fixed by just not redefining these at all if they're already
    defined as macros. To make that easier, I've broken up the oids[]
    array into individual gss_OID_desc declarations, so I can put each one
    inside the appropriate ifdef.
    
    In the process, I've removed the 'const' from the gss_OID_desc
    declarations. That's on purpose! The problem is that not all
    implementations of the GSSAPI headers make const_gss_OID a pointer to
    a *const* gss_OID_desc; sometimes it's just a plain one and the
    'const' prefix is just a comment to the user. So removing that const
    prevents compiler warnings (or worse) about address-taking a const
    thing and assigning it into a non-const pointer.

 ssh/pgssapi.c | 106 +++++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 68 insertions(+), 38 deletions(-)

commit a95e38e9b18ce69b542a9a8c0f18ea8f4c7abb3a
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a95e38e9b18ce69b542a9a8c0f18ea8f4c7abb3a;hp=35a87984f67ebc2db3f670cb1431f08991853a5e
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 17 07:50:55 2022 +0100

    GSSAPI fix: don't pass GSS_C_NO_NAME to inquire_cred_by_mech.
    
    This was pointed out by another compiler warning. The 'name' parameter
    of inquire_cred_by_mech is not a gss_name_t (which is the type of
    GSS_C_NO_NAME); it's a gss_name_t *, because it's an _output_
    parameter. We're not telling the library that we aren't _passing_ a
    name: we're telling it that we don't need it to _return_ us a name. So
    the appropriate null pointer representation is just NULL.
    
    (This was harmless apart from a compiler warning, because gss_name_t
    is a pointer type in turn and GSS_C_NO_NAME expands to a null pointer
    anyway. It was just a wrongly-typed null pointer.)

 ssh/gssc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 732ec31a17a7feac9c24c427f79734e9a97b922f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=732ec31a17a7feac9c24c427f79734e9a97b922f;hp=a95e38e9b18ce69b542a9a8c0f18ea8f4c7abb3a
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Sep 18 15:02:32 2022 +0100

    Add explicit cmake setting for 'build without GTK'.
    
    If you have GTK installed on your system but want to build without it
    anyway (e.g. if you're buliding a package suitable for headless
    systems), it's useful to be able to explicitly instruct PuTTY's build
    system not to use GTK even if it's there.
    
    This would already work if you unilaterally set PUTTY_GTK_VERSION to
    some value other than 1, 2, 3 or ANY. Added NONE as an officially
    supported option, and included it in the list that cmake-gui will
    present.
    
    Also, made the check for libX11 conditional on having GTK, since
    there's no need to bother with it otherwise.

 cmake/gtk.cmake            |  2 +-
 cmake/platforms/unix.cmake | 32 +++++++++++++++++---------------
 2 files changed, 18 insertions(+), 16 deletions(-)

commit fda41e199093b41f026fb8c06e8e2cddcace4d83
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=fda41e199093b41f026fb8c06e8e2cddcace4d83;hp=732ec31a17a7feac9c24c427f79734e9a97b922f
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Sep 18 15:08:31 2022 +0100

    Add cmake check for whether setpgrp takes arguments.
    
    FreeBSD declares setpgrp() as taking two arguments, like Linux's
    setpgid(). Detect that at configure time and adjust the call in
    Pageant appropriately.

 cmake/cmake.h.in           |  2 ++
 cmake/platforms/unix.cmake | 15 +++++++++++++++
 unix/pageant.c             |  4 ++++
 3 files changed, 21 insertions(+)



More information about the tartarus-commits mailing list