svcgssd: check the return code from qword_eol() and log failures
[nfs-utils.git] / utils / gssd / svcgssd_proc.c
index b390bea..6f2ba61 100644 (file)
@@ -109,6 +109,10 @@ do_svc_downcall(gss_buffer_desc *out_handle, struct svc_cred *cred,
        qword_print(f, fname);
        qword_printhex(f, context_token->value, context_token->length);
        err = qword_eol(f);
+       if (err) {
+               printerr(1, "WARNING: error writing to downcall channel "
+                        "%s: %s\n", SVCGSSD_CONTEXT_CHANNEL, strerror(errno));
+       }
        fclose(f);
        return err;
 out_err: