From owner-freebsd-bugs Tue Apr 10 9:50: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B62C737B423 for ; Tue, 10 Apr 2001 09:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f3AGo1j53184; Tue, 10 Apr 2001 09:50:01 -0700 (PDT) (envelope-from gnats) Received: from ns2.arlut.utexas.edu (ns2.arlut.utexas.edu [129.116.174.1]) by hub.freebsd.org (Postfix) with ESMTP id 2E55B37B424 for ; Tue, 10 Apr 2001 09:43:06 -0700 (PDT) (envelope-from gil@arlut.utexas.edu) Received: from ns5.arlut.utexas.edu (ns5.arlut.utexas.edu [10.4.1.6]) by ns2.arlut.utexas.edu (8.11.3/8.11.3) with ESMTP id f3AGgtI13811 for ; Tue, 10 Apr 2001 11:42:55 -0500 (CDT) Received: from csdpc2.arlut.utexas.edu (csdpc2.arlut.utexas.edu [10.3.16.31]) by ns5.arlut.utexas.edu (8.9.3/8.9.3) with ESMTP id LAA86334 for ; Tue, 10 Apr 2001 11:42:55 -0500 (CDT) Received: (from gil@localhost) by csdpc2.arlut.utexas.edu (8.11.1/8.9.1) id f3AGgs050799; Tue, 10 Apr 2001 11:42:54 -0500 (CDT) Message-Id: <200104101642.f3AGgs050799@csdpc2.arlut.utexas.edu> Date: Tue, 10 Apr 2001 11:42:54 -0500 (CDT) From: gil@arlut.utexas.edu Reply-To: gil@arlut.utexas.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: misc/26486: setnetgrent hangs when netgroup contains empty netgroup Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 26486 >Category: misc >Synopsis: setnetgrent hangs when netgroup contains empty netgroup >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 10 09:50:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Gil Kloepfer >Release: FreeBSD 4.2-RELEASE i386 >Organization: UT Applied Research Laboratories >Environment: FreeBSD 4.2-RELEASE, and 4.3-RC2, probably others, using NIS netgroups. >Description: NIS (yp) netgroups set-up as follows: ssh-users adg-ssh-users omg-ssh-users adg-ssh-users omg-ssh-users (-,foo,) (-,bar,) A call to setnetgrent("ssh-users") will hang due to the empty adg-ssh-users netgroup. However, it does work when accessed via /etc/passwd using the +@ syntax... >How-To-Repeat: using above conditions... #include #include main() { char *nh, *nu, *nd; printf("1\n"); setnetgrent("ssh-users"); printf("2\n"); nh = nu = nd = (char *)0; while (getnetgrent(&nh, &nu, &nd) > 0) { printf("3\n"); printf("> %s\n", nu); } printf("4\n"); endnetgrent(); printf("5\n"); exit(0); } >Fix: Currently investigating where the hang is occuring. Will update as soon as I find out more, unless someone else finds it first and lets me know. Probably in the parse_netgrp function in /usr/src/lib/libc/gen/getnetgrent.c >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message