summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarolin Seeger <kseeger@samba.org>2008-08-27 10:38:25 +0200
committerKarolin Seeger <kseeger@samba.org>2008-08-27 10:38:25 +0200
commit0682464774e2bdc838e08bdf77b22e6df16980bc (patch)
treece82a4607ad43c6bbf25f33bdda83b9ee23a3bd2
parent6ee615d191c6ffa97bb27c52ae3cdb2e87a15a9a (diff)
downloadsamba-0682464774e2bdc838e08bdf77b22e6df16980bc.tar.gz
Revert "cifs.upcall: handle MSKRB5 OID properly"
This reverts commit 64ebfe4b2e5b7e3e07a0af424b35000693148e48.
-rw-r--r--source/client/cifs.upcall.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index fd3ed17d2dd..aa5eb57310a 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -29,7 +29,7 @@ create dns_resolver * * /usr/local/sbin/cifs.upcall %k
#include "cifs_spnego.h"
-const char *CIFSSPNEGO_VERSION = "1.2";
+const char *CIFSSPNEGO_VERSION = "1.1";
static const char *prog = "cifs.upcall";
typedef enum _secType {
KRB5,
@@ -73,7 +73,7 @@ int handle_krb5_mech(const char *oid, const char *principal,
tkt_wrapped = spnego_gen_krb5_wrap(tkt, TOK_ID_KRB_AP_REQ);
/* and wrap that in a shiny SPNEGO wrapper */
- *secblob = gen_negTokenInit(oid, tkt_wrapped);
+ *secblob = gen_negTokenInit(OID_KERBEROS5, tkt_wrapped);
data_blob_free(&tkt_wrapped);
data_blob_free(&tkt);
@@ -118,9 +118,6 @@ int decode_key_description(const char *desc, int *ver, secType_t * sec,
if (strncmp(tkn + 4, "krb5", 4) == 0) {
retval |= DKD_HAVE_SEC;
*sec = KRB5;
- } else if (strncmp(tkn + 4, "mskrb5", 6) == 0) {
- retval |= DKD_HAVE_SEC;
- *sec = MS_KRB5;
}
} else if (strncmp(tkn, "uid=", 4) == 0) {
errno = 0;
@@ -222,7 +219,7 @@ int main(const int argc, char *const argv[])
uid_t uid;
int kernel_upcall_version;
int c, use_cifs_service_prefix = 0;
- char *buf, *oid, *hostname = NULL;
+ char *buf, *hostname = NULL;
openlog(prog, 0, LOG_DAEMON);
@@ -304,7 +301,6 @@ int main(const int argc, char *const argv[])
// do mech specific authorization
switch (sectype) {
- case MS_KRB5:
case KRB5:{
char *princ;
size_t len;
@@ -323,12 +319,8 @@ int main(const int argc, char *const argv[])
}
strlcpy(princ + 5, hostname, len - 5);
- if (sectype == MS_KRB5)
- oid = OID_KERBEROS5_OLD;
- else
- oid = OID_KERBEROS5;
-
- rc = handle_krb5_mech(oid, princ, &secblob, &sess_key);
+ rc = handle_krb5_mech(OID_KERBEROS5, princ,
+ &secblob, &sess_key);
SAFE_FREE(princ);
break;
}