Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05b3de63 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French
Browse files

[CIFS] Only dump SPNEGO key if CONFIG_CIFS_DEBUG2 is set



The SPNEGO key data is not terribly interesting except in certain
debugging situations. Only dump it to the ring buffer if needed.

Signed-off-by: default avatarJeff Layton <jlayton@tupile.poochiereds.net>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent dae5dbdb
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -122,11 +122,13 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
	cFYI(1, ("key description = %s", description));
	cFYI(1, ("key description = %s", description));
	spnego_key = request_key(&cifs_spnego_key_type, description, "");
	spnego_key = request_key(&cifs_spnego_key_type, description, "");


#ifdef CONFIG_CIFS_DEBUG2
	if (cifsFYI && !IS_ERR(spnego_key)) {
	if (cifsFYI && !IS_ERR(spnego_key)) {
		struct cifs_spnego_msg *msg = spnego_key->payload.data;
		struct cifs_spnego_msg *msg = spnego_key->payload.data;
		cifs_dump_mem("SPNEGO reply blob:", msg->data,
		cifs_dump_mem("SPNEGO reply blob:", msg->data, min(1024,
				msg->secblob_len + msg->sesskey_len);
				msg->secblob_len + msg->sesskey_len));
	}
	}
#endif /* CONFIG_CIFS_DEBUG2 */


out:
out:
	kfree(description);
	kfree(description);