public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] gssd: Introduce use-gss-proxy boolean to nfs.conf
Date: Sat, 20 Oct 2018 12:03:29 -0400	[thread overview]
Message-ID: <20181020160329.135824-1-steved@redhat.com> (raw)

Allow the used of the gssprox-mech(8) through a the
boolean variable in the [gssd] section of nfs.conf

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 nfs.conf             |  1 +
 systemd/nfs.conf.man |  1 +
 utils/gssd/gssd.c    | 10 ++++++++++
 3 files changed, 12 insertions(+)

diff --git a/nfs.conf b/nfs.conf
index 0d0ec9b..5546109 100644
--- a/nfs.conf
+++ b/nfs.conf
@@ -11,6 +11,7 @@
 #[gssd]
 # use-memcache=0
 # use-machine-creds=1
+# use-gss-proxy=0
 # avoid-dns=1
 # limit-to-legacy-enctypes=0
 # context-timeout=0
diff --git a/systemd/nfs.conf.man b/systemd/nfs.conf.man
index 189b052..699db3f 100644
--- a/systemd/nfs.conf.man
+++ b/systemd/nfs.conf.man
@@ -213,6 +213,7 @@ for details.
 Recognized values:
 .BR use-memcache ,
 .BR use-machine-creds ,
+.BR use-gss-proxy ,
 .BR avoid-dns ,
 .BR limit-to-legacy-enctypes ,
 .BR context-timeout ,
diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
index 00df2fc..2e92f28 100644
--- a/utils/gssd/gssd.c
+++ b/utils/gssd/gssd.c
@@ -89,6 +89,7 @@ char *preferred_realm = NULL;
 char *ccachedir = NULL;
 /* Avoid DNS reverse lookups on server names */
 static bool avoid_dns = true;
+static bool use_gssproxy = false;
 int thread_started = false;
 pthread_mutex_t pmutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_cond_t pcond = PTHREAD_COND_INITIALIZER;
@@ -872,6 +873,7 @@ read_gss_conf(void)
 	if (s)
 		preferred_realm = s;
 
+	use_gssproxy = conf_get_bool("gssd", "use-gss-proxy", use_gssproxy);
 }
 
 int
@@ -957,6 +959,14 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
+	if (use_gssproxy) {
+		if (setenv("GSS_USE_PROXY", "yes", 1) < 0) {
+			printerr(0, "gssd: Unable to set $GSS_USE_PROXY: %s\n", 
+				strerror(errno));
+			exit(EXIT_FAILURE);
+		}
+	}
+
 	if (ccachedir) {
 		char *ccachedir_copy;
 		char *ptr;
-- 
2.17.2

             reply	other threads:[~2018-10-21  0:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-20 16:03 Steve Dickson [this message]
2018-10-22 14:57 ` [PATCH] gssd: Introduce use-gss-proxy boolean to nfs.conf Steve Dickson

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=20181020160329.135824-1-steved@redhat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /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