Date: Fri, 8 Jan 2016 23:58:32 +0000 (UTC) From: Josh Paetzel <jpaetzel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293446 - in stable/10: sys/kgssapi usr.sbin/gssd Message-ID: <201601082358.u08NwWr2034255@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jpaetzel Date: Fri Jan 8 23:58:32 2016 New Revision: 293446 URL: https://svnweb.freebsd.org/changeset/base/293446 Log: 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. Modified: stable/10/sys/kgssapi/gss_impl.c stable/10/usr.sbin/gssd/gssd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kgssapi/gss_impl.c ============================================================================== --- stable/10/sys/kgssapi/gss_impl.c Fri Jan 8 22:59:49 2016 (r293445) +++ stable/10/sys/kgssapi/gss_impl.c Fri Jan 8 23:58:32 2016 (r293446) @@ -105,14 +105,17 @@ sys_gssd_syscall(struct thread *td, stru 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; Modified: stable/10/usr.sbin/gssd/gssd.c ============================================================================== --- stable/10/usr.sbin/gssd/gssd.c Fri Jan 8 22:59:49 2016 (r293445) +++ stable/10/usr.sbin/gssd/gssd.c Fri Jan 8 23:58:32 2016 (r293446) @@ -253,6 +253,7 @@ main(int argc, char **argv) gssd_syscall(_PATH_GSSDSOCK); svc_run(); + gssd_syscall(""); return (0); } @@ -1284,6 +1285,7 @@ void gssd_terminate(int sig __unused) if (hostbased_initiator_cred != 0) unlink(GSSD_CREDENTIAL_CACHE_FILE); #endif + gssd_syscall(""); exit(0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601082358.u08NwWr2034255>