[Freeipa-devel] [Fwd: 2 commits - ipa-server/ipa-kpasswd]
Simo Sorce
ssorce at redhat.com
Tue Jul 15 21:03:49 UTC 2008
Pushed the following under the trivial rule (fixes a segfault)
Simo.
ipa-server/ipa-kpasswd/ipa_kpasswd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 67f62709f83997945b69919cd744ce936ddf5596
Author: Simo Sorce <ssorce at redhat.com>
Date: Tue Jul 15 16:13:43 2008 -0400
In openvz we found out some interfaces may return a null pointer here.
Skip them if no address is provided or we later get a segfault because
we dereference a null pointer.
diff --git a/ipa-server/ipa-kpasswd/ipa_kpasswd.c b/ipa-server/ipa-kpasswd/ipa_kpasswd.c
index 7b4f39e..43ca223 100644
--- a/ipa-server/ipa-kpasswd/ipa_kpasswd.c
+++ b/ipa-server/ipa-kpasswd/ipa_kpasswd.c
@@ -1299,6 +1299,10 @@ int main(int argc, char *argv[])
for (tifa = ifa; tifa; tifa = tifa->ifa_next) {
+ if (NULL == tifa->ifa_addr)
+ /* uhmm no address ?? skip it */
+ continue;
+
if (tifa->ifa_addr->sa_family != AF_INET &&
tifa->ifa_addr->sa_family != AF_INET6) {
/* not interesting for us */
commit 4b4e0e151687621f552ababab7bb960c59e3de86
Author: Simo Sorce <ssorce at redhat.com>
Date: Tue Jul 15 16:16:17 2008 -0400
fix typo
diff --git a/ipa-server/ipa-kpasswd/ipa_kpasswd.c b/ipa-server/ipa-kpasswd/ipa_kpasswd.c
index 1c3ac93..7b4f39e 100644
--- a/ipa-server/ipa-kpasswd/ipa_kpasswd.c
+++ b/ipa-server/ipa-kpasswd/ipa_kpasswd.c
@@ -1319,7 +1319,7 @@ int main(int argc, char *argv[])
hints.ai_flags = AI_NUMERICHOST;
hints.ai_family = AF_UNSPEC;
- /* this shoud return 2 entries, one for UDP and one for TCP */
+ /* this should return 2 entries, one for UDP and one for TCP */
ret = getaddrinfo(host, "kpasswd", &hints, &ai);
if (ret) {
syslog(LOG_ERR, "Error getting address info (%s) for [%s]",
--
Simo Sorce * Red Hat, Inc * New York
More information about the Freeipa-devel
mailing list