From owner-freebsd-bugs Tue Jun 13 14:30:04 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id OAA16763 for bugs-outgoing; Tue, 13 Jun 1995 14:30:04 -0700 Received: (from gnats@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id OAA16756 ; Tue, 13 Jun 1995 14:30:02 -0700 Date: Tue, 13 Jun 1995 14:30:02 -0700 Message-Id: <199506132130.OAA16756@freefall.cdrom.com> From: Bill Fenner Reply-To: Bill Fenner To: freebsd-bugs Subject: bin/508: getnetgrent() prints un-helpful error message (with NULL pointer, even) In-Reply-To: Your message of Tue, 13 Jun 1995 14:31:46 PDT <199506132131.OAA08396@baobab.parc.xerox.com> Sender: bugs-owner@FreeBSD.org Precedence: bulk >Number: 508 >Category: bin >Synopsis: getnetgrent() prints un-helpful error message (with NULL pointer, even) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs (FreeBSD bugs mailing list) >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 13 14:30:01 1995 >Originator: Bill Fenner >Organization: Xerox PARC >Release: FreeBSD 2.0-BUILT-19950527 i386 >Environment: FreeBSD 2.0.5-ALPHA >Description: /etc/netgroup has a single "+" /etc/hosts.equiv has "+@sun-access" The NIS netgroup sun-access is a very deeply recursive list. Example: % ypmatch sun-access netgroup sun-accessN sun-accessD % ypmatch sun-accessN netgroup sun-access01N sun-access02N sun-access03N % ypmatch sun-access03N netgroup parc-pcsN parc-guestsN parc-termportsN % ypmatch parc-pcsN netgroup pcs01N pcs02N pcs03N pcs04N pcs05N pcs06N % ypmatch pcs02N netgroup parc-pcs10N parc-pcs11N parc-pcs12N parc-pcs13N parc-pcs14N parc-pcs15N parc-pcs16N parc-pcs17N parc-pcs18N % ypmatch parc-pcs15N netgroup (esca,-,PARC) (tech-1,-,PARC) (doc-control,-,PARC) (the-stooges,-,PARC) (munira,-,PARC) (sonoma,-,PARC) (tfs-pc,-,PARC) (oemd-pc,-PARC) (fourier,-,PARC) Attempting to rlogin gives: crevenia% rlogin baobab ad netgroup parc-pcs15N at ..(null) I assume that this is the error printed by lib/libc/gen/getnetgrent.c: parse_netgrp(). Now, indeed, oemd-pc's entry is bad, but the error message doesn't exactly make that very obvious... Also, someone ate the first character of the error message. >How-To-Repeat: Create a netgroup with an entry like (foo,-BAR) and try to use getnetgrent() on it. >Fix: Probably just need a more intelligent error message. >Audit-Trail: >Unformatted: