Whamcloud - gitweb
LU-13754 gss: open sptlrpc init channel in R+W mode
[fs/lustre-release.git] / lustre / utils / gss / svcgssd_main_loop.c
index c8cfb41..bfd0624 100644 (file)
@@ -48,6 +48,8 @@
 #include "svcgssd.h"
 #include "err_util.h"
 
+#define GSS_RPC_FILE "/proc/net/rpc/auth.sptlrpc.init/channel"
+
 /*
  * nfs4 in-kernel cache implementation make upcall failed directly
  * if there's no listener detected. so here we should keep the init
@@ -71,7 +73,7 @@ svcgssd_run()
                int save_err;
 
                while (f == NULL) {
-                       f = fopen(gss_rpc_channel_path, "rw");
+                       f = fopen(gss_rpc_channel_path, "r+");
                        if (f == NULL) {
                                printerr(4, "failed to open %s: %s\n",
                                         gss_rpc_channel_path, strerror(errno));