Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
863a0769
Commit
863a0769
authored
Aug 09, 2003
by
Kurt Zeilenga
Browse files
ITS#2662: NS_MTA-MD5 hash check fix
parent
d0a7d4a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/liblutil/passwd.c
View file @
863a0769
...
...
@@ -646,9 +646,13 @@ static int chk_ns_mta_md5(
{
lutil_MD5_CTX
MD5context
;
unsigned
char
MD5digest
[
LUTIL_MD5_BYTES
],
c
;
char
buffer
[
LUTIL_MD5_BYTES
+
LUTIL_MD5_BYTES
+
1
];
char
buffer
[
LUTIL_MD5_BYTES
*
2
];
int
i
;
if
(
passwd
.
bv_len
!=
LUTIL_MD5_BYTES
*
2
)
{
return
1
;
}
/* hash credentials with salt */
lutil_MD5Init
(
&
MD5context
);
lutil_MD5Update
(
&
MD5context
,
...
...
@@ -681,8 +685,8 @@ static int chk_ns_mta_md5(
}
/* compare */
return
memcmp
((
char
*
)
passwd
->
bv_val
,
(
char
*
)
buffer
,
sizeof
(
buffer
))
?
1
:
0
;
return
memcmp
((
char
*
)
passwd
->
bv_val
,
(
char
*
)
buffer
,
sizeof
(
buffer
))
?
1
:
0
;
}
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment