Package: perdition Version: 1.17-7 Severity: minor perdition running on a Debian NIS client bound to a SunOS 5.8 NIS/YP server is unable to look up the real mail server to use from our mail.aliases map. The attached patch works for me since Sun's yp_match() RPC call apparently expects the inkeylen parameter to include the length of the key including the terminating '\0' character, while strlen() excludes the terminating '\0'.
I'm not sure if all NIS servers behave this way or require this behavior from clients, so perhaps this should be some sort of knob, but according to my packet sniffer Python's nis.match() call always sends the terminating '\0'. -- Robert Edmonds [EMAIL PROTECTED]
diff -pru perdition-1.17.orig/perdition/db/nis/perditiondb_nis.c perdition-1.17/perdition/db/nis/perditiondb_nis.c --- perdition-1.17.orig/perdition/db/nis/perditiondb_nis.c 2005-06-22 01:50:04.000000000 -0400 +++ perdition-1.17/perdition/db/nis/perditiondb_nis.c 2007-02-23 19:20:42.865537595 -0500 @@ -89,7 +89,7 @@ int dbserver_get( map, key_str, strlen(key_str), - str_return, + str_return + 1, len_return); if ( res == YPERR_KEY ) {
signature.asc
Description: Digital signature