From kpn@neutralgood.org  Tue Sep  3 18:12:33 2013
Return-Path: <kpn@neutralgood.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 7E45833C
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Sep 2013 18:12:33 +0000 (UTC)
	(envelope-from kpn@neutralgood.org)
Received: from mail.neutralgood.org (gunsight1.neutralgood.org [206.196.19.100])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 451752886
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Sep 2013 18:12:32 +0000 (UTC)
Received: from gunsight1.neutralgood.org (localhost [127.0.0.1])
	by mail.neutralgood.org (8.14.4/8.14.4) with ESMTP id r83I4SAn071276
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 3 Sep 2013 14:04:28 -0400 (EDT)
	(envelope-from kpn@gunsight1.neutralgood.org)
Received: (from kpn@localhost)
	by gunsight1.neutralgood.org (8.14.4/8.14.4/Submit) id r83I4Sed071275;
	Tue, 3 Sep 2013 14:04:28 -0400 (EDT)
	(envelope-from kpn)
Message-Id: <201309031804.r83I4Sed071275@gunsight1.neutralgood.org>
Date: Tue, 3 Sep 2013 14:04:28 -0400 (EDT)
From: "Kevin P. Neal" <kpneal@pobox.com>
Reply-To: "Kevin P. Neal" <kpneal@pobox.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Man page for tmpfile() is inconsistent
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         181785
>Category:       docs
>Synopsis:       [patch] Man page for tmpfile() is inconsistent
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 03 18:20:01 UTC 2013
>Closed-Date:    
>Last-Modified:  Tue Sep 03 22:51:48 UTC 2013
>Originator:     Kevin P. Neal
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD gunsight1.neutralgood.org 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Thu Dec 8 21:58:59 UTC 2011 root@:/usr/obj/usr/src/sys/GENERIC amd64


>Description:

The manual page for tmpfile(), which is shared with tmpnam() and tempnam(),
describes how tmpfile() respects the TMPDIR environment variable. It then
later on says:

     TMPDIR  [tempnam() only] If set, the directory in which the temporary
             file is stored.  TMPDIR is ignored for processes for which
             issetugid(2) is true.

Well, if tmpfile() respects TMPDIR then why does it say it doesn't?
Especially since it already went to the trouble of saying it did.

>How-To-Repeat:

man tmpfile

Scratch head and then check source.

While I'm on the subject, it may be a good idea to change the description
to state that at least some of these functions are part of POSIX. Or,
perhaps just remove the line that states:

     These interfaces are provided from System V and ANSI compatibility only.

>Fix:

*** /usr/src/lib/libc/stdio/tmpnam.3.orig	2013-09-03 13:51:31.000000000 -0400
--- /usr/src/lib/libc/stdio/tmpnam.3	2013-09-03 13:52:48.000000000 -0400
***************
*** 156,161 ****
--- 156,163 ----
  .Bl -tag -width Ds
  .It Ev TMPDIR
  .Pf [ Fn tempnam
+ and
+ .Fn tmpfile
  only]
  If set,
  the directory in which the temporary file is stored.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-doc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Sep 3 22:51:22 UTC 2013 
Responsible-Changed-Why:  
reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181785 
>Unformatted:
