linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] error out if signing was requested, but can't be fulfilled
@ 2007-07-05 19:42 Jeff Layton
  0 siblings, 0 replies; only message in thread
From: Jeff Layton @ 2007-07-05 19:42 UTC (permalink / raw)
  To: linux-cifs-client; +Cc: linux-fsdevel, linux-kernel

Currently, if mount with a signing-enabled sec= option (e.g.
sec=ntlmi), the kernel does a warning printk if the server doesn't
support signing, and then proceeds without signatures.

This is probably OK for people that think to look at the ring buffer,
but seems wrong to me. If someone explicitly requests signing, we
should error out if that request can't be satisfied. They can then
reattempt the mount without signing if that's ok.

Is there any reason not to do something like the following patch?

Signed-off-by: Jeff Layton <jlayton@redhat.com>

diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 4a2458e..c9cae48 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -650,6 +650,7 @@ signing_check:
 			(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED)) == 0) {
 			cERROR(1,
 				("signing required but server lacks support"));
+			rc = -EOPNOTSUPP;
 		} else
 			server->secMode |= SECMODE_SIGN_REQUIRED;
 	} else {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-05 19:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 19:42 [PATCH] error out if signing was requested, but can't be fulfilled Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).