summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-08-22 13:29:16 -0400
committerJeff Layton <jlayton@redhat.com>2008-08-22 13:29:16 -0400
commit2ed60a4f6a6e7533648a588fa3c5d98f37529229 (patch)
treea0ea7fcaca5afedf09ceacc91005d0bb17efb9fa
parent2f02c33982ffc296a05ed8119cd9a9832a2de203 (diff)
downloadsamba-2ed60a4f6a6e7533648a588fa3c5d98f37529229.tar.gz
samba-2ed60a4f6a6e7533648a588fa3c5d98f37529229.tar.bz2
samba-2ed60a4f6a6e7533648a588fa3c5d98f37529229.zip
cifs.upcall: bump SPNEGO msg version number and don't reject old versions
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, and to send the reply with the same version that the request sent. The idea is to try and keep cifs.upcall backward compatible with old kernels. Signed-off-by: Jeff Layton <jlayton@redhat.com> (This used to be commit b868463015dedc684eb13d12118a98ccca71250a)
-rw-r--r--source3/client/cifs.upcall.c4
-rw-r--r--source3/client/cifs_spnego.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/client/cifs.upcall.c b/source3/client/cifs.upcall.c
index cf5f1c3fb0..7cb51660d7 100644
--- a/source3/client/cifs.upcall.c
+++ b/source3/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);
@@ -353,7 +353,7 @@ int main(const int argc, char *const argv[])
rc = 1;
goto out;
}
- keydata->version = CIFS_SPNEGO_UPCALL_VERSION;
+ keydata->version = kernel_upcall_version;
keydata->flags = 0;
keydata->sesskey_len = sess_key.length;
keydata->secblob_len = secblob.length;
diff --git a/source3/client/cifs_spnego.h b/source3/client/cifs_spnego.h
index 13909dd505..f8753a7d59 100644
--- a/source3/client/cifs_spnego.h
+++ b/source3/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.