Unfuckuping LDAP compilation warning.
parent
feee67b353
commit
b939182177
|
@ -12,6 +12,9 @@
|
|||
|
||||
const int NO_SUCH_CARD = LDAP_NO_SUCH_OBJECT;
|
||||
|
||||
// fucking gcc
|
||||
size_t strnlen(const char *s, size_t maxlen);
|
||||
|
||||
static char* ldap_attrs_hashes[] = {
|
||||
"uid",
|
||||
"mifareIDHash",
|
||||
|
@ -65,7 +68,7 @@ int ldap_dn_by_mifare(char *MifareID, char *DNOut, int *DNLength)
|
|||
nentries = ldap_count_entries(ld, msg);
|
||||
result = LDAP_NO_SUCH_OBJECT;
|
||||
for(entry = ldap_first_entry(ld, msg); entry != NULL; entry = ldap_next_entry(ld, entry)) {
|
||||
values = ldap_get_values(ld, entry, "mifareIDHash");
|
||||
values = (unsigned char**)ldap_get_values(ld, entry, "mifareIDHash");
|
||||
if(values) {
|
||||
for(i = 0; values[i] != NULL; ++i) {
|
||||
bzero(entry_salt, 20);
|
||||
|
@ -81,7 +84,7 @@ int ldap_dn_by_mifare(char *MifareID, char *DNOut, int *DNLength)
|
|||
result = 0;
|
||||
}
|
||||
}
|
||||
ldap_value_free(values);
|
||||
ldap_value_free((char **)values);
|
||||
}
|
||||
}
|
||||
search_finalize:
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __LDAP_H__
|
||||
|
||||
int ldap_dn_by_mifare(char *MifareID, char *DNOut, int *DNLength);
|
||||
int hash_mifare(char *MifareID, char *salt, char* target);
|
||||
const int NO_SUCH_CARD;
|
||||
|
||||
#endif
|
||||
|
|
Reference in New Issue