linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] gssd: allow it to work with KEYRING: credcaches
@ 2013-10-03 18:42 Jeff Layton
  2013-10-03 18:42 ` [PATCH 1/2] gssd: have process_krb5_upcall fork before handling upcall Jeff Layton
  2013-10-03 18:42 ` [PATCH 2/2] gssd: switch real uid instead of just fsuid when looking for user creds Jeff Layton
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Layton @ 2013-10-03 18:42 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

This set is comprised of a couple of patches that fix gssd so that it
works with KEYRING: style credcaches. It turns out that gssd already
tries to query GSSAPI to find the best credcache to use and only falls
back to trawling through likely locations for credcaches if that fails.

The problem is that the initial call into GSSAPI for this almost always
fails, so it ends up falling back to trawling in the common case. This
patch corrects this by making a number of changes:

1) credentials are switched sooner during the upcall and don't switch back

2) credentials are switched using setuid() instead of setfsuid(). The
   GSSAPI libs depend on the *real* uid being correct.

3) the daemon now forks before doing any credential switching to ensure
   that unprivileged users can't do anything nefarious to it while it's
   running under a different uid.

With this set of changes, and a bleeding-edge version of the krb5 and
keyutils libs, I can now successfully use KEYRING: style credcaches.

Jeff Layton (2):
  gssd: have process_krb5_upcall fork before handling upcall
  gssd: switch real uid instead of just fsuid when looking for user
    creds

 utils/gssd/gssd_proc.c | 47 ++++++++++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 17 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-03 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 18:42 [PATCH 0/2] gssd: allow it to work with KEYRING: credcaches Jeff Layton
2013-10-03 18:42 ` [PATCH 1/2] gssd: have process_krb5_upcall fork before handling upcall Jeff Layton
2013-10-03 18:56   ` Jeff Layton
2013-10-03 18:42 ` [PATCH 2/2] gssd: switch real uid instead of just fsuid when looking for user creds Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).