From d52a4f7d3d43980431063c8cf9ec70c636f25586 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 27 Jan 1999 05:14:25 +0000 Subject: [PATCH] localaddr.c: On the macintosh, check to see if getmyipaddr returns NULL, and return an error in that case. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11129 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/localaddr.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 71e0eb275..8378d42e1 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ +1999-01-27 Theodore Ts'o + + * localaddr.c: On the macintosh, check to see if getmyipaddr + returns NULL, and return an error in that case. + Tue Jan 5 00:11:49 1999 Theodore Y. Ts'o * sn2princ.c (krb5_sname_to_principal): Windows NT5's broken diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c index 1f3b4c60b..e0b4aa90b 100644 --- a/src/lib/krb5/os/localaddr.c +++ b/src/lib/krb5/os/localaddr.c @@ -302,6 +302,13 @@ krb5_os_localaddr (krb5_context context, krb5_address ***addr) { #ifdef HAVE_MACSOCK_H hostrec = getmyipaddr(); + /* + * XXX This error code is not right, but we have nothing better. + * This will get fixed when we eventually replace the entire + * Macintosh socket emulation layer. + */ + if (!hostrec) + return ENOMEM; #else /* HAVE_MACSOCK_H */ err = 0; @@ -346,3 +353,4 @@ krb5_os_localaddr (krb5_context context, krb5_address ***addr) { return(0); } #endif + -- 2.26.2