[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Heimdal PATCH] LDAP backend support for OpenLDAP 2.1.x
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Luke Howard <lukeh@PADL.COM> writes:
> Here's a similar patch with consistent indenting.
I was thinking about if anything was needed for the update path, I still
haven't figured out if its needed, is it ?
Below is what I commited.
Love
2003-06-17 Love <lha@stacken.kth.se>
* lib/hdb/hdb-ldap.c: use int2HDBFlags/HDBFlags2int From: Alberto
Patino <jalbertop@aranea.com.mx>, Luke Howard <lukeh@PADL.COM>
Pointed out by Andrew Bartlett of Samba
- --- lib/hdb/hdb-ldap.c 27 May 2003 10:03:54 -0000
+++ lib/hdb/hdb-ldap.c 17 Jun 2003 12:49:04 -0000
@@ -421,12 +421,10 @@
}
}
- - memset(&oflags, 0, sizeof(oflags));
- - memcpy(&oflags, &orig.flags, sizeof(HDBFlags));
- - memset(&nflags, 0, sizeof(nflags));
- - memcpy(&nflags, &ent->flags, sizeof(HDBFlags));
+ oflags = HDBFlags2int(orig.flags);
+ nflags = HDBFlags2int(ent->flags);
- - if (memcmp(&oflags, &nflags, sizeof(HDBFlags))) {
+ if (oflags != nflags) {
rc = asprintf(&tmp, "%lu", nflags);
if (rc < 0) {
krb5_set_error_string(context, "asprintf: out of memory");
@@ -629,7 +627,7 @@
char **values;
memset(ent, 0, sizeof(*ent));
- - memset(&ent->flags, 0, sizeof(HDBFlags));
+ ent->flags = int2HDBFlags(0);
ret =
LDAP_get_string_value(db, msg, "krb5PrincipalName",
@@ -801,7 +799,7 @@
} else {
tmp = 0;
}
- - memcpy(&ent->flags, &tmp, sizeof(HDBFlags));
+ ent->flags = int2HDBFlags(tmp);
values = ldap_get_values((LDAP *) db->db, msg, "krb5EncryptionType");
if (values != NULL) {
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (NetBSD)
iQIVAwUBPu8P3BZyDLTSep3UAQIioA/+NS2zUyvSpqJzTTFiPciAoaFKGr5ELRj3
3PY3qG+k1PNm1wingNt/6n413X5l1MfU2dHVn+p3ibD8gwAbwY58TuEbWNcoHeAo
nVzxG/ZXH96SMgJAKcnLys31IXVLkF3tV+z5I0jaINrK4PiR7YUaC186GcYWMLw4
eVj3V4wPZQiqyYP2/q8sHnfVsCm/V/2D1VWPfd2SfnSpespB5z9edRj5wclmvIX5
/tmS8GggIKGmc4KHNB5pw90BIzJw7VN9ndSwlJ9i1Uo1RSQwsc/tcSnEPZPUvEqS
Y32qmzx7fLfo22m455ISzeGzhhfw1mMRekFLXdU+ExMWFq9ZjTHmHBiqQeDr9sqJ
/hdbtWvxPpplYJ2aealzgLNwUjmQNxP8fINUVNW8i9cP2WegERZeR2qaKCFAsaHO
D6SKkWcdwVkEGOR22vQI9Hn742WoXyz/0Tmu2ZFBlyMziiZ3Hq6vzyAEEkk8X4Od
zqZaA2/yx1LImtkX56pOW//ROyiXhDpq5TrrGUNaIe6dy7WoxQeTizaR6I2O4x/h
lX8qDA6kZtz/cM98SejjMQJnNEzA/CibaTAH9KTrYXlLL6O+M6P6mMsQaW4F6V3C
fOZ6freY9HpmhHtOvqNR3/Ewx1j8LiNN2bG/gq90EYBU2pvsxpbginlCoNmgQulW
jB2WKXa0HSU=
=vbOg
-----END PGP SIGNATURE-----