--- nss-myhostname-0.3/nss-myhostname.c 2011-05-09 09:01:27.421581560 -0400 +++ nss-myhostname-0.3-new/nss-myhostname.c 2012-10-06 23:40:09.836894004 -0400 @@ -177,7 +177,11 @@ /* Verify the size matches */ assert(idx == ms); - *pat = r_tuple_prev; + /* Nscd expects us to store the first record in **pat. */ + if (*pat) + **pat = *r_tuple_prev; + else + *pat = r_tuple_prev; if (ttlp) *ttlp = 0;