[linux-cifs-client] [PATCH] cifs.upcall: bump SPNEGO msg version number and don't reject old versions

Jeff Layton jlayton at redhat.com
Fri Aug 22 13:07:01 GMT 2008


When we added the ability for the kernel to send sec=mskrb5 to the
upcall, we subtly broke old cifs.upcall versions that don't understand
it. Bump the spnego message version to 2 to make this clear. Also,
change cifs.upcall to not reject requests with a version that's lower
than the current one. The idea is to try and keep cifs.upcall backward
compatible with old kernels.

Signed-off-by: Jeff Layton <jlayton at redhat.com>
---
 source/client/cifs.upcall.c |    2 +-
 source/client/cifs_spnego.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index cf5f1c3..81b55c8 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -284,7 +284,7 @@ int main(const int argc, char *const argv[])
 	}
 	SAFE_FREE(buf);
 
-	if (kernel_upcall_version != CIFS_SPNEGO_UPCALL_VERSION) {
+	if (kernel_upcall_version > CIFS_SPNEGO_UPCALL_VERSION) {
 		syslog(LOG_WARNING,
 		       "incompatible kernel upcall version: 0x%x",
 		       kernel_upcall_version);
diff --git a/source/client/cifs_spnego.h b/source/client/cifs_spnego.h
index 13909dd..f8753a7 100644
--- a/source/client/cifs_spnego.h
+++ b/source/client/cifs_spnego.h
@@ -23,7 +23,7 @@
 #ifndef _CIFS_SPNEGO_H
 #define _CIFS_SPNEGO_H
 
-#define CIFS_SPNEGO_UPCALL_VERSION 1
+#define CIFS_SPNEGO_UPCALL_VERSION 2
 
 /*
  * The version field should always be set to CIFS_SPNEGO_UPCALL_VERSION.
-- 
1.5.5.1



More information about the linux-cifs-client mailing list