Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jun 1995 14:30:02 -0700
From:      Bill Fenner <fenner@parc.xerox.com>
To:        freebsd-bugs
Subject:   bin/508: getnetgrent() prints un-helpful error message (with NULL pointer, even)
Message-ID:  <199506132130.OAA16756@freefall.cdrom.com>
In-Reply-To: Your message of Tue, 13 Jun 1995 14:31:46 PDT <199506132131.OAA08396@baobab.parc.xerox.com>

next in thread | previous in thread | raw e-mail | index | archive | help

>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:





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506132130.OAA16756>