From owner-freebsd-doc@FreeBSD.ORG Wed Apr 14 09:20:13 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1ED0D16A4CE for ; Wed, 14 Apr 2004 09:20:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02EC143D31 for ; Wed, 14 Apr 2004 09:20:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3EGKCbv088259 for ; Wed, 14 Apr 2004 09:20:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i3EGKCPF088258; Wed, 14 Apr 2004 09:20:12 -0700 (PDT) (envelope-from gnats) Resent-Date: Wed, 14 Apr 2004 09:20:12 -0700 (PDT) Resent-Message-Id: <200404141620.i3EGKCPF088258@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mikhail Teterin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A7B316A4CE; Wed, 14 Apr 2004 09:14:31 -0700 (PDT) Received: from corbulon.video-collage.com (corbulon.video-collage.com [64.35.99.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id D24B943D58; Wed, 14 Apr 2004 09:14:30 -0700 (PDT) (envelope-from mteterin@250-217.customer.cloud9.net) Received: from 250-217.customer.cloud9.net (195-11.customer.cloud9.net [168.100.195.11])i3EGESHQ043827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Apr 2004 12:14:29 -0400 (EDT) (envelope-from mteterin@250-217.customer.cloud9.net) Received: from 250-217.customer.cloud9.net (mteterin@localhost [127.0.0.1]) i3EGEMrj069992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Apr 2004 12:14:23 -0400 (EDT) (envelope-from mteterin@250-217.customer.cloud9.net) Received: (from mteterin@localhost)i3EGEMlY069991; Wed, 14 Apr 2004 12:14:22 -0400 (EDT) (envelope-from mteterin) Message-Id: <200404141614.i3EGEMlY069991@250-217.customer.cloud9.net> Date: Wed, 14 Apr 2004 12:14:22 -0400 (EDT) From: Mikhail Teterin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: mpp@FreeBSD.org cc: jmacd@FreeBSD.org Subject: docs/65530: minor improvement to getgrent.3 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2004 16:20:13 -0000 >Number: 65530 >Category: docs >Synopsis: minor improvement to getgrent.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 14 09:20:12 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Mikhail Teterin >Release: FreeBSD 5.2-CURRENT i386 >Organization: Virtual Estates, Inc. >Environment: >Description: The man-page for getgrent and friends gives the layout of the ``struct group'', but does not explicitly mention, that the list of group members in the gr_mem is NULL terminated. Since there is nothing like "gr_mem_len" anywhere, the NULL termination can be deduced, but explicitly documenting it would be useful. For example, the http://www.cs.vu.nl/pub/minix/2.0.0/wwwman/man3/getgrent.3.html offers Minix' man-page, where the gr_mem is explicitly documented to be NULL-terminated. In fact, ours was too: ---------------------------- revision 1.5 date: 1996/06/20 14:13:15; author: jmacd; state: Exp; lines: +2 -2 branches: 1.5.2; I hate to read a man page that almost has useful information but falls a little short. I added a comment on the null termination of struct group's gr_mem field. Reviewed by: jkh ---------------------------- but was removed for some reason in 1.8 -- probably a branch/trunk misunderstanding with 1.8 overwriting the changes in 1.5.2... ---------------------------- revision 1.8 date: 1997/01/30 23:01:47; author: mpp; state: Exp; lines: +2 -2 Update to reflect current include files. ---------------------------- >How-To-Repeat: >Fix: The exact verbiage is, probably, not important. jmacd's version and the Minix link above use word "null". I think, "NULL" is better, but don't have a strong opinion: =================================================================== RCS file: /home/ncvs/src/lib/libc/gen/getgrent.3,v retrieving revision 1.23 diff -U2 -r1.23 getgrent.3 --- getgrent.3 8 Sep 2003 19:57:14 -0000 1.23 +++ getgrent.3 14 Apr 2004 16:09:58 -0000 @@ -85,5 +85,5 @@ char *gr_passwd; /* group password */ gid_t gr_gid; /* group id */ - char **gr_mem; /* group members */ + char **gr_mem; /* NULL-terminated list of group members */ }; .Ed >Release-Note: >Audit-Trail: >Unformatted: