summaryrefslogtreecommitdiffstats
path: root/sys/kgssapi/gss_impl.c
diff options
context:
space:
mode:
authorjpaetzel <jpaetzel@FreeBSD.org>2016-01-08 23:58:32 +0000
committerjpaetzel <jpaetzel@FreeBSD.org>2016-01-08 23:58:32 +0000
commit7e9f675c8ee5b79cd70ff7cba2e827aa4293d0a3 (patch)
treee28ba9366b4df499511bd88e93461cdd65688c87 /sys/kgssapi/gss_impl.c
parentc3db70fd0ce0c30063d042a689a0626a435af810 (diff)
downloadFreeBSD-src-7e9f675c8ee5b79cd70ff7cba2e827aa4293d0a3.zip
FreeBSD-src-7e9f675c8ee5b79cd70ff7cba2e827aa4293d0a3.tar.gz
MFC 293043
Unset the gss kernel state when gssd exits When gssd exits it leaves the kernel state set by gssd_syscall(). nfsd sees this and waits endlessly in an unkillable state for gssd to come back. If you had acidentally started gssd then stopped it, then started nfsd you'd be in a bad way until you either restarted gssd or rebooted the system. This change fixes that by setting the kernel state to "" when gssd exits.
Diffstat (limited to 'sys/kgssapi/gss_impl.c')
-rw-r--r--sys/kgssapi/gss_impl.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/kgssapi/gss_impl.c b/sys/kgssapi/gss_impl.c
index 172471a..d27f219 100644
--- a/sys/kgssapi/gss_impl.c
+++ b/sys/kgssapi/gss_impl.c
@@ -105,14 +105,17 @@ sys_gssd_syscall(struct thread *td, struct gssd_syscall_args *uap)
if (error)
return (error);
- sun.sun_family = AF_LOCAL;
- strcpy(sun.sun_path, path);
- sun.sun_len = SUN_LEN(&sun);
-
- nconf = getnetconfigent("local");
- cl = clnt_reconnect_create(nconf,
- (struct sockaddr *) &sun, GSSD, GSSDVERS,
- RPC_MAXDATASIZE, RPC_MAXDATASIZE);
+ if (path[0] != '\0') {
+ sun.sun_family = AF_LOCAL;
+ strcpy(sun.sun_path, path);
+ sun.sun_len = SUN_LEN(&sun);
+
+ nconf = getnetconfigent("local");
+ cl = clnt_reconnect_create(nconf,
+ (struct sockaddr *) &sun, GSSD, GSSDVERS,
+ RPC_MAXDATASIZE, RPC_MAXDATASIZE);
+ } else
+ cl = NULL;
mtx_lock(&kgss_gssd_lock);
oldcl = kgss_gssd_handle;
OpenPOWER on IntegriCloud