summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-23 19:53:15 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-23 19:53:15 +0200
commitd6a5476ee7af464a381bbeeec576ee58f3650a43 (patch)
treec19d8dab5fe71ad76f3d0f7698afc1300bf3443c /source3/libads
parent55fd6b125c3e5ac135d124c291f5ae6102fcbb2f (diff)
downloadsamba-d6a5476ee7af464a381bbeeec576ee58f3650a43.tar.gz
samba-d6a5476ee7af464a381bbeeec576ee58f3650a43.tar.bz2
samba-d6a5476ee7af464a381bbeeec576ee58f3650a43.zip
Use sockaddr_storage only where we rely on the size, use sockaddr
otherwise (to clarify we can also pass in structs smaller than sockaddr_storage, such as sockaddr_in).
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/kerberos.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 501ef010fd..4658f66cfd 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -772,7 +772,8 @@ static char *get_kdc_ip_string(char *mem_ctx,
get_kdc_list(realm, sitename, &ip_srv_site, &count_site);
for (i = 0; i < count_site; i++) {
- if (addr_equal(&ip_srv_site[i].ss, pss)) {
+ if (addr_equal((struct sockaddr *)&ip_srv_site[i].ss,
+ (struct sockaddr *)pss)) {
continue;
}
/* Append to the string - inefficient
@@ -794,14 +795,14 @@ static char *get_kdc_ip_string(char *mem_ctx,
for (i = 0; i < count_nonsite; i++) {
int j;
- if (addr_equal(&ip_srv_nonsite[i].ss, pss)) {
+ if (addr_equal((struct sockaddr *)&ip_srv_nonsite[i].ss, (struct sockaddr *)pss)) {
continue;
}
/* Ensure this isn't an IP already seen (YUK! this is n*n....) */
for (j = 0; j < count_site; j++) {
- if (addr_equal(&ip_srv_nonsite[i].ss,
- &ip_srv_site[j].ss)) {
+ if (addr_equal((struct sockaddr *)&ip_srv_nonsite[i].ss,
+ (struct sockaddr *)&ip_srv_site[j].ss)) {
break;
}
/* As the lists are sorted we can break early if nonsite > site. */