projects
/
mech_eap.orig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f2fa717
)
don't store count in exported RADIUS attrs
author
Luke Howard
<lukeh@padl.com>
Sun, 10 Oct 2010 15:51:26 +0000
(17:51 +0200)
committer
Luke Howard
<lukeh@padl.com>
Sun, 10 Oct 2010 15:51:26 +0000
(17:51 +0200)
Makefile.am
patch
|
blob
|
history
util_radius.cpp
patch
|
blob
|
history
diff --git
a/Makefile.am
b/Makefile.am
index
99aa736
..
6a4557c
100644
(file)
--- a/
Makefile.am
+++ b/
Makefile.am
@@
-72,6
+72,7
@@
mech_eap_la_SOURCES = \
util_cksum.c \
util_cred.c \
util_crypt.c \
util_cksum.c \
util_cred.c \
util_crypt.c \
+ util_exts.c \
util_krb.c \
util_lucid.c \
util_mech.c \
util_krb.c \
util_lucid.c \
util_mech.c \
diff --git
a/util_radius.cpp
b/util_radius.cpp
index
588a558
..
0237eed
100644
(file)
--- a/
util_radius.cpp
+++ b/
util_radius.cpp
@@
-654,19
+654,11
@@
gss_eap_radius_attr_provider::initFromBuffer(const gss_eap_attr_ctx *ctx,
{
unsigned char *p = (unsigned char *)buffer->value;
size_t remain = buffer->length;
{
unsigned char *p = (unsigned char *)buffer->value;
size_t remain = buffer->length;
- uint32_t count;
VALUE_PAIR **pNext = &m_vps;
if (!gss_eap_attr_provider::initFromBuffer(ctx, buffer))
return false;
VALUE_PAIR **pNext = &m_vps;
if (!gss_eap_attr_provider::initFromBuffer(ctx, buffer))
return false;
- if (remain < 4)
- return false;
-
- count = load_uint32_be(p);
- p += 4;
- remain -= 4;
-
do {
VALUE_PAIR *attr;
do {
VALUE_PAIR *attr;
@@
-675,27
+667,20
@@
gss_eap_radius_attr_provider::initFromBuffer(const gss_eap_attr_ctx *ctx,
*pNext = attr;
pNext = &attr->next;
*pNext = attr;
pNext = &attr->next;
-
- count--;
} while (remain != 0);
} while (remain != 0);
- if (count != 0)
- return false;
-
return true;
}
void
gss_eap_radius_attr_provider::exportToBuffer(gss_buffer_t buffer) const
{
return true;
}
void
gss_eap_radius_attr_provider::exportToBuffer(gss_buffer_t buffer) const
{
- uint32_t count = 0;
VALUE_PAIR *vp;
unsigned char *p;
VALUE_PAIR *vp;
unsigned char *p;
- size_t remain =
4
;
+ size_t remain =
0
;
for (vp = m_vps; vp != NULL; vp = vp->next) {
remain += avpSize(vp);
for (vp = m_vps; vp != NULL; vp = vp->next) {
remain += avpSize(vp);
- count++;
}
buffer->value = GSSEAP_MALLOC(remain);
}
buffer->value = GSSEAP_MALLOC(remain);
@@
-707,10
+692,6
@@
gss_eap_radius_attr_provider::exportToBuffer(gss_buffer_t buffer) const
p = (unsigned char *)buffer->value;
p = (unsigned char *)buffer->value;
- store_uint32_be(count, p);
- p += 4;
- remain -= 4;
-
for (vp = m_vps; vp != NULL; vp = vp->next) {
avpExport(vp, &p, &remain);
}
for (vp = m_vps; vp != NULL; vp = vp->next) {
avpExport(vp, &p, &remain);
}