1 From 8a5ba5feb98ecc3c57ee865604799fc4e4a90c61 Mon Sep 17 00:00:00 2001
2 From: Alexander Scheel <ascheel@redhat.com>
3 Date: Mon, 26 Jun 2017 17:04:16 -0400
4 Subject: [PATCH] Conditionally reload kernel interface on SIGHUP
6 Signed-off-by: Alexander Scheel <ascheel@redhat.com>
7 [rharwood@redhat.com: Simplified logic, rewrote commit message]
8 Reviewed-by: Robbie Harwood <rharwood@redhat.com>
11 (cherry picked from commit 938af94b8f33c227dcdd6a53ed42de418578d29d)
13 proxy/src/gp_init.c | 4 +++-
14 proxy/src/gssproxy.c | 3 +++
15 2 files changed, 6 insertions(+), 1 deletion(-)
17 diff --git a/proxy/src/gp_init.c b/proxy/src/gp_init.c
18 index e69934d..6a2b047 100644
19 --- a/proxy/src/gp_init.c
20 +++ b/proxy/src/gp_init.c
21 @@ -145,6 +145,7 @@ void init_proc_nfsd(struct gp_config *cfg)
25 + static int poked = 0;
27 /* check first if any service enabled kernel support */
28 for (int i = 0; i < cfg->num_svcs; i++) {
29 @@ -154,7 +155,7 @@ void init_proc_nfsd(struct gp_config *cfg)
34 + if (!enabled || poked) {
38 @@ -173,6 +174,7 @@ void init_proc_nfsd(struct gp_config *cfg)
39 LINUX_PROC_USE_GSS_PROXY_FILE, ret, gp_strerror(ret));
46 diff --git a/proxy/src/gssproxy.c b/proxy/src/gssproxy.c
47 index 94a6a61..5fc4f8d 100644
48 --- a/proxy/src/gssproxy.c
49 +++ b/proxy/src/gssproxy.c
50 @@ -140,6 +140,9 @@ static void hup_handler(verto_ctx *vctx, verto_ev *ev UNUSED)
54 + /* conditionally reload kernel interface */
55 + init_proc_nfsd(gpctx->config);
57 free_config(&old_config);
59 GPDEBUG("New config loaded successfully.\n");