about summary refs log tree commit diff
path: root/nis/nis_ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_ping.c')
-rw-r--r--nis/nis_ping.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nis/nis_ping.c b/nis/nis_ping.c
index 941adfbda4..4ec34ce4c0 100644
--- a/nis/nis_ping.c
+++ b/nis/nis_ping.c
@@ -34,7 +34,7 @@ nis_ping (const_nis_name dirname, u_long utime, const nis_object *dirobj)
 
   if (dirobj == NULL)
     {
-      res = nis_lookup (dirname, EXPAND_NAME + FOLLOW_LINKS);
+      res = nis_lookup (dirname, MASTER_ONLY);
       if (res->status != NIS_SUCCESS && res->status != NIS_S_SUCCESS)
 	return;
       obj = res->objects.objects_val;
@@ -44,7 +44,11 @@ nis_ping (const_nis_name dirname, u_long utime, const nis_object *dirobj)
 
   /* Check if obj is really a diryectory object */
   if (obj->zo_data.zo_type != DIRECTORY_OBJ)
-    abort ();
+    {
+      if (res != NULL)
+	nis_freeresult (res);
+      return;
+    }
 
   if (dirname == NULL)
     args.dir = obj->DI_data.do_name;