Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 795135 - net-misc/openssh: Please add support KRB5CCNAME=KCM:
Summary: net-misc/openssh: Please add support KRB5CCNAME=KCM:
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-09 20:54 UTC by Joakim Tjernlund
Modified: 2023-11-21 22:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Makes KCM: work for openssh (0001-Description-Improve-ccache-handling-in-openssh.patch,19.16 KB, patch)
2023-11-10 17:01 UTC, Joakim Tjernlund
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2021-06-09 20:54:04 UTC
RH patches openssh to support KRB5CCNAME=KCM: (KCM=Kerberos Cache Manager) which
is impl. in sssd.

Info and patch can be found via https://bugzilla.mindrot.org/show_bug.cgi?id=3203
Comment 1 Patrick McLean gentoo-dev 2021-06-09 21:30:20 UTC
We are already maintaining quite a large number of patches for OpenSSH. Ideally, we would prefer to wait for upstream to accept this patch to reduce the workload on developers.

Generally we are ahead of other distros in OpenSSH bumps, so we usually end up doing the patch updating work ourselves when a new release comes out.
Comment 2 Joakim Tjernlund 2021-06-10 07:36:14 UTC
I see, getting this upstream is a slow process though. Seem like there must be some consensus how to proceed first.

For me KCM is not of much use until openssh can use it.
Comment 3 Patrick McLean gentoo-dev 2021-06-16 18:48:56 UTC
(In reply to Joakim Tjernlund from comment #2)
> I see, getting this upstream is a slow process though. Seem like there must
> be some consensus how to proceed first.
> 
> For me KCM is not of much use until openssh can use it.

It is fully possible to carry the patch locally by dropping it in /etc/portage/patches/net-misc/openssh
Comment 4 Joakim Tjernlund 2021-06-17 21:08:55 UTC
(In reply to Patrick McLean from comment #3)
> (In reply to Joakim Tjernlund from comment #2)
> > I see, getting this upstream is a slow process though. Seem like there must
> > be some consensus how to proceed first.
> > 
> > For me KCM is not of much use until openssh can use it.
> 
> It is fully possible to carry the patch locally by dropping it in
> /etc/portage/patches/net-misc/openssh

I tested that but the patch did not apply, didn't check further.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-17 21:13:40 UTC
(In reply to Joakim Tjernlund from comment #4)
> (In reply to Patrick McLean from comment #3)
> > (In reply to Joakim Tjernlund from comment #2)
> > > I see, getting this upstream is a slow process though. Seem like there must
> > > be some consensus how to proceed first.
> > > 
> > > For me KCM is not of much use until openssh can use it.
> > 
> > It is fully possible to carry the patch locally by dropping it in
> > /etc/portage/patches/net-misc/openssh
> 
> I tested that but the patch did not apply, didn't check further.

So what were we supposed to do? :)
Comment 6 Patrick McLean gentoo-dev 2021-06-17 21:16:38 UTC
That is not unexpected, the patch will need to be modified to apply correctly against the version (and USE flag combination) of OpenSSH you are installing.

This is generally the case with every applied patch for each new version of OpenSSH, which is why we are reluctant to add more patches as this work gets added to the work that needs doing for every new release of OpenSSH.
Comment 7 Joakim Tjernlund 2021-07-11 19:46:04 UTC
For other people looking at KCM, there is a simple workarond, in /etc/security/pam_env.conf add:
KRB5CCNAME	DEFAULT="KCM:"
Comment 8 Joakim Tjernlund 2023-11-10 16:59:59 UTC
From this I fond KCM becoming more popular:
https://github.com/openssh-gsskex/openssh-gsskex/issues/24#issuecomment-1768955946

leading to
https://git.launchpad.net/~canonical-server/ubuntu/+source/openssh/tree/debian/gssapi-unique-patches?h=openssh-split-unique-gssapi

Trying those patches failed though, Gentoo seems vastly different than anyone else.
Why is that ?

Anyhow, I backported gssapi-new-unique.patch and seems to work for me,
attaching patch
Comment 9 Joakim Tjernlund 2023-11-10 17:01:25 UTC
Created attachment 874478 [details, diff]
Makes KCM: work for openssh
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-10 17:05:12 UTC
Redhat applies a very large patchset to OpenSSH.
Comment 11 Joakim Tjernlund 2023-11-10 17:21:50 UTC
(In reply to Sam James from comment #10)
> Redhat applies a very large patchset to OpenSSH.

So seems Debian and Ubuntu
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-10 17:23:30 UTC
Yep. Debian applies a similar but different large GSS patch. Please send the patch upstream if you want it in Gentoo.
Comment 13 Joakim Tjernlund 2023-11-11 14:22:24 UTC
(In reply to Sam James from comment #12)
> Yep. Debian applies a similar but different large GSS patch. Please send the
> patch upstream if you want it in Gentoo.

Redhat already sent it upstream long ago, don't know why it has not been accepted
yet but I do think upstream moves very slow sometimes.

I am thinking that if Redhat, Debian and Ubuntu carries this patch so maybe can Gentoo too?
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-11 15:27:37 UTC
We really don't want to get back into the game of applying various non-upstream patches for OpenSSH which require regular rebasing.

Maybe bring it up on their ML if you're wondering why the bug hasn't gone anywhere.
Comment 15 Joakim Tjernlund 2023-11-11 18:27:13 UTC
(In reply to Sam James from comment #14)
> We really don't want to get back into the game of applying various
> non-upstream patches for OpenSSH which require regular rebasing.
> 
> Maybe bring it up on their ML if you're wondering why the bug hasn't gone
> anywhere.

That is a lost cause as RH already did that. It seems upstream is hard to
work with as most, if not all, distributions carry patches.
That is an indication that it is unavoidable if you want to offer a modern
openssh

If your policy is to reject patches that aren't upstream there isn't anything
more I can do.