linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] GSSD: Do not fork when UID = 0
@ 2015-09-21 20:50 andros
  2015-09-21 20:50 ` [PATCH 1/4] GSSD: move process_krb5_upcall machine cred case to helper function andros
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: andros @ 2015-09-21 20:50 UTC (permalink / raw)
  To: steved; +Cc: jlayton, linux-nfs, Andy Adamson

From: Andy Adamson <andros@netapp.com>

Jeff Layton worked on this patch set with me.

patch 0001 and 0002 clean up process_krb5_upcall() by moving the two cases into
helper functions.

patch 0003 is the heart of this patch set.

commit f9cac65972da588d5218236de60a7be11247a8aa added the fork to
process_krb5_upcall so that the child assumes the uid of the principal
requesting service. This is good for the reasons listed in the commit.

When machine credentials are used, a gssd_k5_kt_princ entry is added to
a global list and used by future upcalls to note when valid machine credentials
have been obtained. When a child process performs this task, the entry to the
global list is lost upon exit, and all upcalls for machine credentials re-fetch
a TGT, even when a valid TGT is in the machine kerberos credential cache.

Since forking is not necessary when the principal has uid=0, solve the
gssd_k5_kt_princ_list issue by only forking when the uid != 0.

Please do more testing. Comments welcome.

Andy Adamson (4):
  GSSD: move process_krb5_upcall machine cred case to helper function
  GSSD: move process_krb5_updcall non machine cred case to helper
    function
  GSSD only fork when uid is not zeo
  GSSD: clean up machine credentials

 utils/gssd/gssd.c      |  10 +-
 utils/gssd/gssd_proc.c | 244 ++++++++++++++++++++++++++++++-------------------
 2 files changed, 154 insertions(+), 100 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2015-09-22 17:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 20:50 [PATCH 0/4] GSSD: Do not fork when UID = 0 andros
2015-09-21 20:50 ` [PATCH 1/4] GSSD: move process_krb5_upcall machine cred case to helper function andros
2015-09-21 20:50 ` [PATCH 2/4] GSSD: move process_krb5_updcall non " andros
2015-09-21 20:50 ` [PATCH 3/4] GSSD only fork when uid is not zeo andros
2015-09-21 20:50 ` [PATCH 4/4] GSSD: clean up machine credentials andros
2015-09-22 11:24   ` Jeff Layton
2015-09-22 16:38     ` Adamson, Andy
2015-09-22 17:09       ` 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).