From owner-cvs-libexec Tue Sep 30 11:14:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA11122 for cvs-libexec-outgoing; Tue, 30 Sep 1997 11:14:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA11091; Tue, 30 Sep 1997 11:13:42 -0700 (PDT) From: Bill Paul Received: (from wpaul@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id LAA28457; Tue, 30 Sep 1997 11:08:11 -0700 (PDT) Date: Tue, 30 Sep 1997 11:08:11 -0700 (PDT) Message-Id: <199709301808.LAA28457@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-libexec@FreeBSD.ORG Subject: cvs commit: src/libexec/ypxfr ypxfr_main.c Sender: owner-cvs-libexec@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 1997/09/30 11:08:11 PDT Modified files: libexec/ypxfr ypxfr_main.c Log: Putting records with zero-length keys into a Berkeley DB hash database is asking for trouble (sequential database enumerations can get caught in an infinite loop). The yp_mkdb(8) utility avoids putting such records into a database, but ypxfr does not. Today I got bit by a NULL entry in one of the amd maps on my network, which is served by a SunOS master. The map was transfered successfully to my FreeBSD slave, but attempting to dump it with ypcat(1) caused ypserv(8) to transmit the same record over and over again, making the map appear to be infinitely large. I finally noticed the problem while testing a new version of amd under development at the Columbia CS department, which began gobbling up insane amounts of memory while trying to swallow the map. To deal with this problem, I'm modifying ypxfr to watch for records with zero-length keys and turn them into something less destructive before writing them to the database. Revision Changes Path 1.10 +22 -6 src/libexec/ypxfr/ypxfr_main.c