summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clispnego.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-10-02 12:54:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:05 -0500
commitaf85d8ec02b36b765ceadf0a342c7eda2410034b (patch)
tree505b95c5d3702a6feb043a035ad165fe658e2a45 /source/libsmb/clispnego.c
parente8dd73f79656d9ef6faf9fceb84dc8702ac8e10a (diff)
downloadsamba-af85d8ec02b36b765ceadf0a342c7eda2410034b.tar.gz
samba-af85d8ec02b36b765ceadf0a342c7eda2410034b.tar.xz
samba-af85d8ec02b36b765ceadf0a342c7eda2410034b.zip
r19041: Make us connect to Vista RC1. Apparently metze had done the same patch some
weeks ago. We have some work before us, when in AD mode Vista sends "not_defined_in_RFC4178@please_ignore" as the principal..... Volker
Diffstat (limited to 'source/libsmb/clispnego.c')
-rw-r--r--source/libsmb/clispnego.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/libsmb/clispnego.c b/source/libsmb/clispnego.c
index fedf7e5c6eb..a01c009b6e3 100644
--- a/source/libsmb/clispnego.c
+++ b/source/libsmb/clispnego.c
@@ -149,13 +149,16 @@ BOOL spnego_parse_negTokenInit(DATA_BLOB blob,
asn1_end_tag(&data);
asn1_end_tag(&data);
- asn1_start_tag(&data, ASN1_CONTEXT(3));
- asn1_start_tag(&data, ASN1_SEQUENCE(0));
- asn1_start_tag(&data, ASN1_CONTEXT(0));
- asn1_read_GeneralString(&data,principal);
- asn1_end_tag(&data);
- asn1_end_tag(&data);
- asn1_end_tag(&data);
+ *principal = NULL;
+ if (asn1_tag_remaining(&data) > 0) {
+ asn1_start_tag(&data, ASN1_CONTEXT(3));
+ asn1_start_tag(&data, ASN1_SEQUENCE(0));
+ asn1_start_tag(&data, ASN1_CONTEXT(0));
+ asn1_read_GeneralString(&data,principal);
+ asn1_end_tag(&data);
+ asn1_end_tag(&data);
+ asn1_end_tag(&data);
+ }
asn1_end_tag(&data);
asn1_end_tag(&data);