gssd: Introduce use-gss-proxy boolean to nfs.conf
Subsystems (2)
PATCH 1/1 gssd: Introduce use-gss-proxy boolean to nfs.conf
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 <[email protected]>
--- nfs.conf | 1 + systemd/nfs.conf.man | 1 + utils/gssd/gssd.c | 10 ++++++++++ 3 files changed, 12 insertions(+)
nfs.conf +1 -0
@@ -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
systemd/nfs.conf.man +1 -0
@@ -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 ,
utils/gssd/gssd.c +10 -0
@@ -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;
Signature · 1 line
2.17.2
Quoted 4 lines · Steve Dickson
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 <[email protected]>
Committed...
steved.
Quoted 66 lines
--- nfs.conf | 1 + systemd/nfs.conf.man | 1 + utils/gssd/gssd.c | 10 ++++++++++ 3 files changed, 12 insertions(+)nfs.conf +1
-0@@ -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=0systemd/nfs.conf.man +1
-0@@ -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 ,utils/gssd/gssd.c +10
-0@@ -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;