diff -up autofs-5.0.3/CHANGELOG.handle-zero-length-nis-key autofs-5.0.3/CHANGELOG
--- autofs-5.0.3/CHANGELOG.handle-zero-length-nis-key 2008-03-24 14:07:30.000000000 +0900
+++ autofs-5.0.3/CHANGELOG 2008-03-24 14:08:08.000000000 +0900
@@ -8,6 +8,7 @@
- another fix for don't fail on empty master map.
- fix expire working harder than needed.
- fix unlink of mount tree incorrectly causing autofs mount fail.
+- add missing check for zero length NIS key (Wengang Wang).
14/01/2008 autofs-5.0.3
-----------------------
diff -up autofs-5.0.3/modules/lookup_yp.c.handle-zero-length-nis-key autofs-5.0.3/modules/lookup_yp.c
--- autofs-5.0.3/modules/lookup_yp.c.handle-zero-length-nis-key 2008-01-14 13:39:16.000000000 +0900
+++ autofs-5.0.3/modules/lookup_yp.c 2008-03-24 14:07:45.000000000 +0900
@@ -168,6 +168,10 @@ int yp_all_master_callback(int status, c
if (status != YP_TRUE)
return status;
+ /* Ignore zero length keys */
+ if (ypkeylen == 0)
+ return 0;
+
/*
* Ignore keys beginning with '+' as plus map
* inclusion is only valid in file maps.
@@ -263,6 +267,10 @@ int yp_all_callback(int status, char *yp
if (status != YP_TRUE)
return status;
+ /* Ignore zero length keys */
+ if (ypkeylen == 0)
+ return 0;
+
/*
* Ignore keys beginning with '+' as plus map
* inclusion is only valid in file maps.