Bug 206220 - mail/mutt: GSSAPI not using Heimdal from Ports, leads to environ corruption
Summary: mail/mutt: GSSAPI not using Heimdal from Ports, leads to environ corruption
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords: easy, patch, patch-ready
Depends on: 205284
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-14 01:57 UTC by Phil Pennock
Modified: 2016-01-28 12:14 UTC (History)
2 users (show)

See Also:
pi: maintainer-feedback+
koobs: merge-quarterly?


Attachments
mail/mutt Makefile patch for GSSAPI Uses system (3.21 KB, patch)
2016-01-14 01:57 UTC, Phil Pennock
no flags Details | Diff
additional patch (1013 bytes, patch)
2016-01-25 14:26 UTC, Udo.Schweigert
Udo.Schweigert: maintainer-approval+
Details | Diff
poudriere log (118.43 KB, text/plain)
2016-01-25 17:18 UTC, Udo.Schweigert
no flags Details
single patch (3.48 KB, patch)
2016-01-28 07:50 UTC, Udo.Schweigert
Udo.Schweigert: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Pennock 2016-01-14 01:57:21 UTC
Created attachment 165535 [details]
mail/mutt Makefile patch for GSSAPI Uses system

mail/mutt rolls its own GSSAPI handling system, looking for installed libraries, rather than employing the "Uses" knobs (which probably post-date the mutt Port's GSSAPI support).

When linking against OpenSSL from Ports, this results in one mutt process pulling in both libcrypto.so.8 from Ports and libcrypto.so.7 from the base system (FreeBSD 10.1), leading to environ corruption problems when running external commands, which complain at startup (libc routines detect the corruption).  These look like:

    sh: environment corrupt; missing value for SOME_VAR

and can be seen when, eg, viewing a PGP-signed mail with GnuPG integration turned on.

This patch switches mail/mutt to use the GSSAPI "Uses" system, and has been verified to work for me with Heimdal from Ports.  I haven't tested the other variants, but they're textbook copy/paste.

I previously reported this via mail to the port maintainer on 2015-05-24 (at which time, the maintainer was out-of-office) and haven't chased between then and now.
Comment 1 Udo.Schweigert 2016-01-22 15:05:22 UTC
I will check this soon and will give maintainer feedback. Sorry for the delay.

Udo
Comment 2 Udo.Schweigert 2016-01-24 20:01:07 UTC
This does not work for GSSAPI taken from base, so I have to look deeper into that later next week, ...
Comment 3 Udo.Schweigert 2016-01-25 14:26:00 UTC
Created attachment 166102 [details]
additional patch

The additional patch is necessary to get base config working. Please commit this after the pending PR 205284 has been closed.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-25 14:29:27 UTC
@Udo,

Can you confirm this change passes QA (portlint, poudriere) on a jail that uses base GSSAPI please
Comment 5 Udo.Schweigert 2016-01-25 17:18:28 UTC
Created attachment 166110 [details]
poudriere log

Here is a poudriere log as requested.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-25 17:21:32 UTC
Thank you!
Comment 7 Udo.Schweigert 2016-01-28 07:50:49 UTC
Created attachment 166225 [details]
single patch

For your convenience here the patch in one file which should be applicable after PR 205284 has been committed. The poudriere log still applies as nothing has changed.
Comment 8 Udo.Schweigert 2016-01-28 07:53:38 UTC
Please note: new file to be added to the tree: files/patch-m4-gssapi.m4
Comment 9 Kurt Jaeger freebsd_committer freebsd_triage 2016-01-28 11:45:56 UTC
Testbuilds in all variants done, looks fine.
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-01-28 11:51:22 UTC
A commit references this bug:

Author: pi
Date: Thu Jan 28 11:50:36 UTC 2016
New revision: 407407
URL: https://svnweb.freebsd.org/changeset/ports/407407

Log:
  mail/mutt: provide options to build with GSSAPI variants

  The port rolls its own GSSAPI handling system, looking for installed
  libraries, rather than employing the "Uses" knobs (which probably
  post-date the mutt Port's GSSAPI support).

  When linking against OpenSSL from Ports, this results in one mutt
  process pulling in both libcrypto.so.8 from Ports and libcrypto.so.7
  from the base system (FreeBSD 10.1), leading to environ corruption
  problems when running external commands, which complain at startup
  (libc routines detect the corruption).  These look like:

      sh: environment corrupt; missing value for SOME_VAR

  and can be seen when, eg, viewing a PGP-signed mail with GnuPG
  integration turned on.

  This patch switches mail/mutt to use the GSSAPI "Uses" system.

  PR:		206220
  Submitted by:	Phil Pennock <freebsd@phil.spodhuis.org>
  Approved by:	Udo Schweigert <Udo.Schweigert@siemens.com> (maintainer)

Changes:
  head/mail/mutt/Makefile
  head/mail/mutt/files/patch-m4-gssapi.m4
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-01-28 12:12:25 UTC
A commit references this bug:

Author: pi
Date: Thu Jan 28 12:11:41 UTC 2016
New revision: 407408
URL: https://svnweb.freebsd.org/changeset/ports/407408

Log:
  mail/mutt: set GSSAPI default to NONE

  - this was the old default

  PR:		206220

Changes:
  head/mail/mutt/Makefile
Comment 12 Kurt Jaeger freebsd_committer freebsd_triage 2016-01-28 12:14:12 UTC
Thanks, committed!