From: Paulo Alcantara <pc@manguebit.org>
To: Pavel Shilovsky <piastryyy@gmail.com>
Cc: Alexander Bokovoy <ab@samba.org>,
Shyam Prasad N <sprasad@microsoft.com>,
Bharath SM <bharathsm@microsoft.com>,
David Howells <dhowells@redhat.com>,
linux-cifs@vger.kernel.org
Subject: Re: [PATCH] cifs.upcall: resolve scraped ccache name explicitly
Date: Thu, 17 Sep 2026 13:22:10 -0300 [thread overview]
Message-ID: <26c7e0c3802f0fca96aed145d6042cb8@manguebit.org> (raw)
In-Reply-To: <20260917003750.1790143-1-pc@manguebit.org>
Paulo Alcantara <pc@manguebit.org> writes:
> get_existing_cc() selected the credentials cache scraped from the
> initiating process' environment by exporting it via setenv($KRB5CCNAME)
> and then calling krb5_cc_default().
>
> MIT krb5 reads $KRB5CCNAME through secure_getenv(), which returns NULL
> whenever the process runs with AT_SECURE set. The request-key upcall
> that spawns cifs.upcall triggers an SELinux domain transition, so on
> systems with SELinux enforcing cifs.upcall runs with AT_SECURE=1. The
> setenv() is therefore silently ignored and krb5 falls back to the
> profile default_ccache_name (KCM: on many distros). As a result, a
> valid TGT living in a FILE credential cache is never found, and the
> mount fails with:
>
> cifs.upcall: main: valid TGT is not present in credential cache
> cifs.upcall: Unable to obtain service ticket
>
> while the same TGT in a KCM cache (selected via the profile default,
> not the environment) works fine.
>
> Resolve the scraped name directly with krb5_cc_resolve(), which takes
> the ccache name as an argument and does not consult secure_getenv(),
> so the FILE ccache is honored regardless of AT_SECURE. Fall back to
> krb5_cc_default() only when nothing was scraped.
> ...
Applied.
prev parent reply other threads:[~2026-09-17 16:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 0:37 [PATCH] cifs.upcall: resolve scraped ccache name explicitly Paulo Alcantara
2026-09-17 7:06 ` Shyam Prasad N
2026-09-17 16:22 ` Paulo Alcantara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26c7e0c3802f0fca96aed145d6042cb8@manguebit.org \
--to=pc@manguebit.org \
--cc=ab@samba.org \
--cc=bharathsm@microsoft.com \
--cc=dhowells@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=piastryyy@gmail.com \
--cc=sprasad@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox