From owner-freebsd-standards@FreeBSD.ORG Sun Feb 13 10:09:36 2011 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80687106566B for ; Sun, 13 Feb 2011 10:09:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 0397B8FC1D for ; Sun, 13 Feb 2011 10:09:35 +0000 (UTC) Received: from c122-107-114-89.carlnfd1.nsw.optusnet.com.au (c122-107-114-89.carlnfd1.nsw.optusnet.com.au [122.107.114.89]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p1DA9MvD031699 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Feb 2011 21:09:23 +1100 Date: Sun, 13 Feb 2011 21:09:22 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Cran In-Reply-To: <201102122318.17338.brucec@freebsd.org> Message-ID: <20110213203708.R1205@besplex.bde.org> References: <201102122116.p1CLGtJm051987@freefall.freebsd.org> <36a85352-9802-460b-b616-00cf9f9e502f@email.android.com> <201102122318.17338.brucec@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Garrett Wollman , freebsd-doc@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: docs/143472: gethostname(3) references undefined value: HOST_NAME_MAX X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 10:09:36 -0000 On Sat, 12 Feb 2011, Bruce Cran wrote: > On Saturday 12 February 2011 22:17:16 Garrett Wollman wrote: > >> The Standard uses special typography to indicate these parameters; we >> should, too. > > Having done further reading on opengroup.org I realised that the brackets do > indicate that it's a value that can be obtained through sysconf(3). > > However, it's not especially clear to readers unfamiliar with the Standard, > and has confused people in the past - for example http://www.mail- > archive.com/bug-gnulib@gnu.org/msg14789.html . I wonder if there's a way we > can improve the documentation to make it clear that these values aren't > necessarily preprocessor definitions? o Use the braces in the thousands of places that they are needed instead of in only a few places. o Document them in intro.2 if not already. o Remove the compile-time constant values, especially for things like {OPEN_MAX} which were never constant in BSD, so that things break properly when variables are misspelled as constants It would be nauseating to expand {FOO_MAX} in the thousands of places where the limit might be variable. > I've attached a patch to sysconf(3) which adds documentation of > {HOST_NAME_MAX} and others. The patch also replaces "cpu" by "machine". But "machine" is similar to "cpu" and is identical with the CPU name in many contexts, e.g.: - the MACHINE make variable on i386 systems, er machines, is i386 - for uname(1): - uname -m gives the machine name, which is something like i386 - uname -p gives the machine processor name, which is also something like i386 - uname -n gives the system name, which is normally the host name So gethostname(2) returns a system name, not a machine name, according to the terminology of uname(1). POSIX doesn't use this terminology for gethostname() however. The host name can be anything you want, although other entities may want it to be what they want or what it was. Changing it from my fake internet domain name to i386 works here according to hostname(1). I didn't keep this setting for long or test it with other entities. The details of what uname -n returns are undocumented in in uname(1), but uname(3) and says that the struct member `nodename' contains the "Network [node] name". POSIX says that `nodename' contains the "name of this node within an implementation-defined communications network". But uname(1) is not required to print the same strings that struct utsname holds, except as en extension, since there are large unportabilities in this area. Bruce From owner-freebsd-standards@FreeBSD.ORG Sun Feb 13 11:43:57 2011 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E7431065672 for ; Sun, 13 Feb 2011 11:43:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx07.syd.optusnet.com.au (fallbackmx07.syd.optusnet.com.au [211.29.132.9]) by mx1.freebsd.org (Postfix) with ESMTP id D09328FC12 for ; Sun, 13 Feb 2011 11:43:55 +0000 (UTC) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by fallbackmx07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p1D9bIDe027659 for ; Sun, 13 Feb 2011 20:37:18 +1100 Received: from c122-107-114-89.carlnfd1.nsw.optusnet.com.au (c122-107-114-89.carlnfd1.nsw.optusnet.com.au [122.107.114.89]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p1D9asMM026088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Feb 2011 20:36:56 +1100 Date: Sun, 13 Feb 2011 20:36:54 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Wollman In-Reply-To: <7670d9f9-77ea-41b0-9cdc-58122ebc9156@email.android.com> Message-ID: <20110213202630.D1205@besplex.bde.org> References: <201102122140.p1CLe7vg072805@freefall.freebsd.org> (sfid-20110212_16402_8B3946F8) <7670d9f9-77ea-41b0-9cdc-58122ebc9156@email.android.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-standards@FreeBSD.org Subject: Re: docs/143472 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 11:43:57 -0000 On Sat, 12 Feb 2011, Garrett Wollman wrote: > Bruce Cran wrote: > >> I've attached a patch which should fix the issue. >> -Host names are limited to >> -.Brq Dv HOST_NAME_MAX >> -characters, not including the trailing null, currently 255. > > This is actually the correct statement. The OP should have taken note of the braces. Except for the grammar error (comma splice). Bruce From owner-freebsd-standards@FreeBSD.ORG Mon Feb 14 09:48:30 2011 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D42971065679 for ; Mon, 14 Feb 2011 09:48:30 +0000 (UTC) (envelope-from murray@stokely.org) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 88AD98FC22 for ; Mon, 14 Feb 2011 09:48:30 +0000 (UTC) Received: by iyb26 with SMTP id 26so4658635iyb.13 for ; Mon, 14 Feb 2011 01:48:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.171.73 with SMTP id i9mr4647806icz.116.1297675125705; Mon, 14 Feb 2011 01:18:45 -0800 (PST) Received: by 10.231.199.11 with HTTP; Mon, 14 Feb 2011 01:18:45 -0800 (PST) In-Reply-To: <20110207200839.GA82306@zim.MIT.EDU> References: <4D4EF746.9070502@gwdg.de> <20110207200839.GA82306@zim.MIT.EDU> Date: Mon, 14 Feb 2011 01:18:45 -0800 Message-ID: From: Murray Stokely To: Rainer Hurling , freebsd-standards@freebsd.org, Murray Stokely Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Support for C99 complex type required X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 09:48:30 -0000 On Mon, Feb 7, 2011 at 12:08 PM, David Schultz wrote: > The 'complex' type and rudimentary operations on complex numbers > are supported, but the math library is missing all of the > transcendental functions on complex numbers. =A0There is some > ongoing work in the area, but due to time constraints, it will > likely be a while before we have complete support. =A0In the mean > time, you can see /usr/include/complex.h for a list of supported > functions. =A0I recall someone mentioning that there is a port that > provides most of the missing functionality. Hi David, Is there any reason we can't pull in these missing libm routines from NetBSD? They seem to have pulled in code from netlib and gotten permission to relicense it under the BSD license. E.g. here is one of the functions our FreeBSD 9 libm still lacks AFAICT: http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cexp.c?only_with= _tag=3DMAIN Also, Darwin seems to have picked up much of there C99 math support from NetBSD as well, although it appears they've added more under an APSL license and they provide assembly language code for Intel, Arm, and PowerPC : http://www.opensource.apple.com/source/Libm/Libm-315/Source/Intel/ http://www.opensource.apple.com/source/Libm/Libm-315/Source/complex.h Pulling in the APSL code may be a bit more controversial (though I think warranted), but pulling in code from NetBSD seems like a no brainer given that this standard is over a decade old and modern software like Mplayer, R, etc depend on the newer C99 functions. Does the ongoing work in this area you describe involve porting the NetBSD code or are you talking about another implementation? - Murray From owner-freebsd-standards@FreeBSD.ORG Mon Feb 14 10:08:43 2011 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4604B106564A; Mon, 14 Feb 2011 10:08:43 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from amailer.gwdg.de (amailer.gwdg.de [134.76.10.18]) by mx1.freebsd.org (Postfix) with ESMTP id CA2D18FC0C; Mon, 14 Feb 2011 10:08:42 +0000 (UTC) Received: from wald.nfv.gwdg.de ([134.76.242.31] helo=pc028.nfv) by mailer.gwdg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PovMG-0005Fe-9x; Mon, 14 Feb 2011 11:08:40 +0100 Message-ID: <4D58FF1F.8070207@gwdg.de> Date: Mon, 14 Feb 2011 11:08:31 +0100 From: Rainer Hurling User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; de-DE; rv:1.9.2.13) Gecko/20101221 Thunderbird/3.1.7 MIME-Version: 1.0 To: Murray Stokely References: <4D4EF746.9070502@gwdg.de> <20110207200839.GA82306@zim.MIT.EDU> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated: Id:rhurlin X-Spam-Level: - X-Virus-Scanned: (clean) by exiscan+sophie Cc: David Schultz , freebsd-standards@freebsd.org Subject: Re: Support for C99 complex type required X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 10:08:43 -0000 Am 14.02.2011 10:18 (UTC+1) schrieb Murray Stokely: > On Mon, Feb 7, 2011 at 12:08 PM, David Schultz wrote: >> The 'complex' type and rudimentary operations on complex numbers >> are supported, but the math library is missing all of the >> transcendental functions on complex numbers. There is some >> ongoing work in the area, but due to time constraints, it will >> likely be a while before we have complete support. In the mean >> time, you can see /usr/include/complex.h for a list of supported >> functions. I recall someone mentioning that there is a port that >> provides most of the missing functionality. > > Hi David, > > Is there any reason we can't pull in these missing libm routines from > NetBSD? They seem to have pulled in code from netlib and gotten > permission to relicense it under the BSD license. E.g. here is one of > the functions our FreeBSD 9 libm still lacks AFAICT: > > http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cexp.c?only_with_tag=MAIN > Brian Ripley explained at r-devel@r-project.org (02/07/2011), that there are some problems with code taken from NetBSD and put into Cygwin: "Cygwin has recently[*] added support for C99 complex math, taken from NetBSD with code that is very similar to that from Steven Moshier available via http://www.moshier.net/c9x_readme.html. That code isn't entirely right, especially not at the cuts on the inverse functions where C99 mandates what cut is used (and neither glibc nor Mac OS X have it correct). [*] AFAICS not yet released in Cygwin, but in newlib 1.19.0." > Also, Darwin seems to have picked up much of there C99 math support > from NetBSD as well, although it appears they've added more under an > APSL license and they provide assembly language code for Intel, Arm, > and PowerPC : > > http://www.opensource.apple.com/source/Libm/Libm-315/Source/Intel/ > http://www.opensource.apple.com/source/Libm/Libm-315/Source/complex.h > > Pulling in the APSL code may be a bit more controversial (though I > think warranted), but pulling in code from NetBSD seems like a no > brainer given that this standard is over a decade old and modern > software like Mplayer, R, etc depend on the newer C99 functions. > > Does the ongoing work in this area you describe involve porting the > NetBSD code or are you talking about another implementation? > > - Murray From owner-freebsd-standards@FreeBSD.ORG Mon Feb 14 11:07:13 2011 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A2241065704 for ; Mon, 14 Feb 2011 11:07:13 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 863988FC1D for ; Mon, 14 Feb 2011 11:07:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1EB7Dpt077310 for ; Mon, 14 Feb 2011 11:07:13 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1EB7CZl077308 for freebsd-standards@FreeBSD.org; Mon, 14 Feb 2011 11:07:12 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 14 Feb 2011 11:07:12 GMT Message-Id: <201102141107.p1EB7CZl077308@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 11:07:13 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/154185 standards race condition in mb_dupcl o stand/153756 standards fp leak in hesiod.c . o stand/152415 standards [libm] implementation of expl() o stand/151316 standards lib/libc/string/strerror.c r1.9 breaks POSIX o stand/150093 standards C++ std::locale support is broken a stand/149980 standards [libc] [patch] negative value integer to nanosleep(2) o stand/147210 standards xmmintrin.h and cstdlib conflicts with each other with o stand/144231 standards bind/connect/sendto too strict about sockaddr length o docs/143472 standards gethostname(3) references undefined value: HOST_NAME_M o stand/142803 standards j0 Bessel function inaccurate near zeros of the functi s stand/141705 standards [libc] [request] libc lacks cexp (and friends) o stand/130067 standards Wrong numeric limits in system headers? o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/123688 standards POSIX standard changes in unistd.h and grp.h o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/116826 standards [patch] sh support for POSIX character classes o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude o stand/114633 standards /etc/rc.subr: line 511: omits a quotation mark: "force p stand/107561 standards [libc] [patch] [request] Missing SUS function tcgetsid o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/96236 standards [patch] [posix] sed(1) incorrectly describes a functio o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/82654 standards C99 long double math functions are missing o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( s stand/62858 standards malloc(0) not C99 compliant o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44365 standards [headers] [patch] [request] introduce ulong and unchar a stand/41576 standards ln(1): replacing old dir-symlinks o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 44 problems total. From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 10:30:11 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B33661065694 for ; Thu, 17 Feb 2011 10:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F6F98FC13 for ; Thu, 17 Feb 2011 10:30:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HAUBgg009974 for ; Thu, 17 Feb 2011 10:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1HAUB5N009973; Thu, 17 Feb 2011 10:30:11 GMT (envelope-from gnats) Resent-Date: Thu, 17 Feb 2011 10:30:11 GMT Resent-Message-Id: <201102171030.p1HAUB5N009973@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yaroslav Verbin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01DDD106566C for ; Thu, 17 Feb 2011 10:21:55 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id E56008FC0C for ; Thu, 17 Feb 2011 10:21:54 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HALsJL048782 for ; Thu, 17 Feb 2011 10:21:54 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p1HALrQp048781; Thu, 17 Feb 2011 10:21:53 GMT (envelope-from nobody) Message-Id: <201102171021.p1HALrQp048781@red.freebsd.org> Date: Thu, 17 Feb 2011 10:21:53 GMT From: Yaroslav Verbin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: standards/154842: invalid request authenticator in the second and subsequent acct-packets, generated by libradius X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 10:30:11 -0000 >Number: 154842 >Category: standards >Synopsis: invalid request authenticator in the second and subsequent acct-packets, generated by libradius >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 17 10:30:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Yaroslav Verbin >Release: 7.3,8.1 >Organization: lifelink >Environment: FreeBSD nas 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: This problem occurs when the software (i used mpd5 from ports), that uses libradius, re-sends the acct-packet. Due to a bug in the library the second and subsequent acct-packets are have corrupted request authenticator and can not be accepted radius server with an error: Received Accounting-Request packet from client x.x.x.x with invalid signature! (Shared secret is incorrect.) Dropping packet without response. >How-To-Repeat: drop first acct-packet. >Fix: --- radlib.c 2010-06-14 02:09:06.000000000 +0000 +++ radlib.c.new 2011-02-16 10:28:11.000000000 +0000 @@ -641,10 +641,6 @@ insert_scrambled_password(h, h->srv); } insert_message_authenticator(h, 0); - if (h->out[POS_CODE] != RAD_ACCESS_REQUEST) { - /* Insert the request authenticator into the request */ - insert_request_authenticator(h, h->srv); - } /* Send the request */ n = sendto(h->fd, h->out, h->out_len, 0, @@ -910,6 +906,10 @@ } h->try = h->srv = 0; + if (h->out[POS_CODE] != RAD_ACCESS_REQUEST) { + /* Insert the request authenticator into the request */ + insert_request_authenticator(h, h->srv); + } return rad_continue_send_request(h, 0, fd, tv); } >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 10:40:10 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 778A5106564A for ; Thu, 17 Feb 2011 10:40:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4F4108FC18 for ; Thu, 17 Feb 2011 10:40:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HAeAnh020968 for ; Thu, 17 Feb 2011 10:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1HAeA0I020967; Thu, 17 Feb 2011 10:40:10 GMT (envelope-from gnats) Date: Thu, 17 Feb 2011 10:40:10 GMT Message-Id: <201102171040.p1HAeA0I020967@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Bruce Cran Cc: Subject: Re: standards/104743: [headers] [patch] Wrong values for _POSIX_ minimal limits X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Cran List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 10:40:10 -0000 The following reply was made to PR standards/104743; it has been noted by GNATS. From: Bruce Cran To: bug-followup@FreeBSD.org, thomas@cuivre.fr.eu.org, jilles@freebsd.org Cc: Subject: Re: standards/104743: [headers] [patch] Wrong values for _POSIX_ minimal limits Date: Thu, 17 Feb 2011 10:39:16 +0000 Can this PR be closed now? From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 10:40:51 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BEB61065674; Thu, 17 Feb 2011 10:40:51 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 732788FC13; Thu, 17 Feb 2011 10:40:51 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HAepuM026752; Thu, 17 Feb 2011 10:40:51 GMT (envelope-from brucec@freefall.freebsd.org) Received: (from brucec@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1HAepgA026740; Thu, 17 Feb 2011 10:40:51 GMT (envelope-from brucec) Date: Thu, 17 Feb 2011 10:40:51 GMT Message-Id: <201102171040.p1HAepgA026740@freefall.freebsd.org> To: jeremyhu@apple.com, brucec@FreeBSD.org, freebsd-standards@FreeBSD.org From: brucec@FreeBSD.org Cc: Subject: Re: standards/151316: lib/libc/string/strerror.c r1.9 breaks POSIX X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 10:40:51 -0000 Synopsis: lib/libc/string/strerror.c r1.9 breaks POSIX State-Changed-From-To: open->feedback State-Changed-By: brucec State-Changed-When: Thu Feb 17 10:40:31 UTC 2011 State-Changed-Why: Feedback was requested. http://www.freebsd.org/cgi/query-pr.cgi?pr=151316 From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 10:42:51 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E51F1065674; Thu, 17 Feb 2011 10:42:51 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 761CA8FC15; Thu, 17 Feb 2011 10:42:51 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HAgpMl030169; Thu, 17 Feb 2011 10:42:51 GMT (envelope-from brucec@freefall.freebsd.org) Received: (from brucec@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1HAgp2T030165; Thu, 17 Feb 2011 10:42:51 GMT (envelope-from brucec) Date: Thu, 17 Feb 2011 10:42:51 GMT Message-Id: <201102171042.p1HAgp2T030165@freefall.freebsd.org> To: brucec@FreeBSD.org, freebsd-standards@FreeBSD.org, freebsd-net@FreeBSD.org From: brucec@FreeBSD.org Cc: Subject: Re: kern/154185: race condition in mb_dupcl X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 10:42:51 -0000 Synopsis: race condition in mb_dupcl Responsible-Changed-From-To: freebsd-standards->freebsd-net Responsible-Changed-By: brucec Responsible-Changed-When: Thu Feb 17 10:42:02 UTC 2011 Responsible-Changed-Why: Not a standards issue. http://www.freebsd.org/cgi/query-pr.cgi?pr=154185 From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 10:46:51 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 283B61065695; Thu, 17 Feb 2011 10:46:51 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F406B8FC19; Thu, 17 Feb 2011 10:46:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HAko6R030518; Thu, 17 Feb 2011 10:46:50 GMT (envelope-from brucec@freefall.freebsd.org) Received: (from brucec@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1HAkoDK030514; Thu, 17 Feb 2011 10:46:50 GMT (envelope-from brucec) Date: Thu, 17 Feb 2011 10:46:50 GMT Message-Id: <201102171046.p1HAkoDK030514@freefall.freebsd.org> To: stefan@fafoe.narf.at, brucec@FreeBSD.org, freebsd-standards@FreeBSD.org From: brucec@FreeBSD.org Cc: Subject: Re: standards/62858: malloc(0) not C99 compliant X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 10:46:51 -0000 Synopsis: malloc(0) not C99 compliant State-Changed-From-To: suspended->closed State-Changed-By: brucec State-Changed-When: Thu Feb 17 10:46:21 UTC 2011 State-Changed-Why: Fixed in all supported releases. http://www.freebsd.org/cgi/query-pr.cgi?pr=62858 From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 10:50:35 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A666B106564A; Thu, 17 Feb 2011 10:50:35 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7E1598FC13; Thu, 17 Feb 2011 10:50:35 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HAoZQx035364; Thu, 17 Feb 2011 10:50:35 GMT (envelope-from brucec@freefall.freebsd.org) Received: (from brucec@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1HAoZaB035355; Thu, 17 Feb 2011 10:50:35 GMT (envelope-from brucec) Date: Thu, 17 Feb 2011 10:50:35 GMT Message-Id: <201102171050.p1HAoZaB035355@freefall.freebsd.org> To: brucec@FreeBSD.org, freebsd-standards@FreeBSD.org, freebsd-net@FreeBSD.org From: brucec@FreeBSD.org Cc: Subject: Re: kern/144231: bind/connect/sendto too strict about sockaddr length X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 10:50:35 -0000 Synopsis: bind/connect/sendto too strict about sockaddr length Responsible-Changed-From-To: freebsd-standards->freebsd-net Responsible-Changed-By: brucec Responsible-Changed-When: Thu Feb 17 10:48:57 UTC 2011 Responsible-Changed-Why: Not a standards issue: POSIX says EINVAL is returned if address_len is not a valid length for the address family, so FreeBSD's implementation would appear to be correct. http://www.freebsd.org/cgi/query-pr.cgi?pr=144231 From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 11:00:27 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A3B210656A4 for ; Thu, 17 Feb 2011 11:00:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E854D8FC17 for ; Thu, 17 Feb 2011 11:00:26 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HB0QKd042932 for ; Thu, 17 Feb 2011 11:00:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1HB0QQ0042912; Thu, 17 Feb 2011 11:00:26 GMT (envelope-from gnats) Date: Thu, 17 Feb 2011 11:00:26 GMT Message-Id: <201102171100.p1HB0QQ0042912@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Bruce Cran Cc: Subject: Re: standards/107561: [libc] [patch] [request] Missing SUS function tcgetsid() X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Cran List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 11:00:27 -0000 The following reply was made to PR standards/107561; it has been noted by GNATS. From: Bruce Cran To: bug-followup@FreeBSD.org, jau@iki.fi Cc: Subject: Re: standards/107561: [libc] [patch] [request] Missing SUS function tcgetsid() Date: Thu, 17 Feb 2011 10:53:37 +0000 This has been fixed in stable/8 but not MFC'd back to stable/7. -- Bruce Cran From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 12:19:30 2011 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 158BE1065674 for ; Thu, 17 Feb 2011 12:19:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 80A568FC1F for ; Thu, 17 Feb 2011 12:19:29 +0000 (UTC) Received: from c122-107-114-89.carlnfd1.nsw.optusnet.com.au (c122-107-114-89.carlnfd1.nsw.optusnet.com.au [122.107.114.89]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p1HCJJeE003289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Feb 2011 23:19:21 +1100 Date: Thu, 17 Feb 2011 23:19:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Cran In-Reply-To: <201102171040.p1HAeA0I020967@freefall.freebsd.org> Message-ID: <20110217230119.X2097@besplex.bde.org> References: <201102171040.p1HAeA0I020967@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-standards@freebsd.org Subject: Re: standards/104743: [headers] [patch] Wrong values for _POSIX_ minimal limits X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 12:19:30 -0000 On Thu, 17 Feb 2011, Bruce Cran wrote: > Subject: Re: standards/104743: [headers] [patch] Wrong values for _POSIX_ > minimal limits > > Can this PR be closed now? Most of its points seem to be unaddressed. According to the followup, some of the limits depend on the version of POSIX. FreeBSD attempts to support old versions of POSIX, and has some such support even in (to prevent new POSIX definitions being visible for old versions of POSIX), but it doesn't have ifdefs for any of the values. All the old names are under a __POSIX_VISIBLE ifdef, which means any version of POSIX, but the values for many of the old names are different in at least POSIX.1-1990 from the ones in current POSIX, and now matches current POSIX according to the followup. I checked that patch in the original PR resets all the values that it changes to match POSIX.1-1990. Bruce From owner-freebsd-standards@FreeBSD.ORG Thu Feb 17 18:30:15 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2161065670 for ; Thu, 17 Feb 2011 18:30:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7DAE38FC17 for ; Thu, 17 Feb 2011 18:30:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HIUFdp030980 for ; Thu, 17 Feb 2011 18:30:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1HIUFri030979; Thu, 17 Feb 2011 18:30:15 GMT (envelope-from gnats) Date: Thu, 17 Feb 2011 18:30:15 GMT Message-Id: <201102171830.p1HIUFri030979@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Jeremy Huddleston Cc: Subject: Re: standards/151316: lib/libc/string/strerror.c r1.9 breaks POSIX X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeremy Huddleston List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 18:30:15 -0000 The following reply was made to PR standards/151316; it has been noted by GNATS. From: Jeremy Huddleston To: Jilles Tjoelker Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: standards/151316: lib/libc/string/strerror.c r1.9 breaks POSIX Date: Thu, 17 Feb 2011 10:06:19 -0800 On Oct 9, 2010, at 05:37, Jilles Tjoelker wrote: >> This introduces a regression in SUS conformance. > > Please explain why. Well first and foremost because it causes the SUS conformance tests to fail: /tset/PTHR.os/cfuncs/strerror_r/T.strerror_r 1 Failed Test Description: For UNIX03 and POSIX01 modes: If the _POSIX_THREAD_SAFE_FUNCTIONS option is supported: The strerror_r(errnum, strerrbuf, buflen) function shall map the error number in errnum to a locale-dependent error message string and shall return the string in the buffer pointed to by strerrbuf, with length buflen, and return 0. Test Information: strerror_r unexpectedly failed strerror_r unexpectedly failed strerror_r unexpectedly failed strerror_r unexpectedly failed strerror_r unexpectedly failed strerror_r unexpectedly failed strerror_r unexpectedly failed strerror_r unexpectedly failed > In any case, this is of little practical effect since few programs check > the value of errno set by strerror(). If the patch is accepted, > sys_errlist[0] will probably be changed to "Unknown error: 0" so the > only difference is errno set by strerror(). You should change it to "No error: 0" or "Success: 0" From owner-freebsd-standards@FreeBSD.ORG Fri Feb 18 22:55:56 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 993531065693; Fri, 18 Feb 2011 22:55:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 712E88FC29; Fri, 18 Feb 2011 22:55:56 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1IMtu3L097895; Fri, 18 Feb 2011 22:55:56 GMT (envelope-from jilles@freefall.freebsd.org) Received: (from jilles@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1IMtui3097891; Fri, 18 Feb 2011 22:55:56 GMT (envelope-from jilles) Date: Fri, 18 Feb 2011 22:55:56 GMT Message-Id: <201102182255.p1IMtui3097891@freefall.freebsd.org> To: jeremyhu@apple.com, jilles@FreeBSD.org, freebsd-standards@FreeBSD.org, jilles@FreeBSD.org From: jilles@FreeBSD.org Cc: Subject: Re: standards/151316: lib/libc/string/strerror.c r1.9 breaks POSIX X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 22:55:56 -0000 Synopsis: lib/libc/string/strerror.c r1.9 breaks POSIX State-Changed-From-To: feedback->open State-Changed-By: jilles State-Changed-When: Fri Feb 18 22:54:35 UTC 2011 State-Changed-Why: Feedback has been received. I am asking the Austin group about this. Responsible-Changed-From-To: freebsd-standards->jilles Responsible-Changed-By: jilles Responsible-Changed-When: Fri Feb 18 22:54:35 UTC 2011 Responsible-Changed-Why: I am handling this. http://www.freebsd.org/cgi/query-pr.cgi?pr=151316 From owner-freebsd-standards@FreeBSD.ORG Sat Feb 19 03:10:12 2011 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29736106567A for ; Sat, 19 Feb 2011 03:10:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D44D08FC12 for ; Sat, 19 Feb 2011 03:10:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1J3ABp4066103 for ; Sat, 19 Feb 2011 03:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1J3ABAY066102; Sat, 19 Feb 2011 03:10:11 GMT (envelope-from gnats) Resent-Date: Sat, 19 Feb 2011 03:10:11 GMT Resent-Message-Id: <201102190310.p1J3ABAY066102@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mark Martinec Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F073C1065674 for ; Sat, 19 Feb 2011 03:06:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id C3C678FC1D for ; Sat, 19 Feb 2011 03:06:31 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1J36VrG069800 for ; Sat, 19 Feb 2011 03:06:31 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p1J36Vfs069799; Sat, 19 Feb 2011 03:06:31 GMT (envelope-from nobody) Message-Id: <201102190306.p1J36Vfs069799@red.freebsd.org> Date: Sat, 19 Feb 2011 03:06:31 GMT From: Mark Martinec To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: standards/154873: ZFS violates POSIX on open/O_CREAT -> ftruncate X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 03:10:12 -0000 >Number: 154873 >Category: standards >Synopsis: ZFS violates POSIX on open/O_CREAT -> ftruncate >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 19 03:10:11 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Mark Martinec >Release: FreeBSD 8.1-RELEASE-p2 amd64 >Organization: Jozef Stefan Institute >Environment: FreeBSD neli.ijs.si 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #12: Thu Dec 2 14:30:03 CET 2010 mark@neli.ijs.si:/usr/obj/usr/src/sys/NELI amd64 >Description: POSIX.1-2008 requires that the third argument to open(2) on O_CREAT does not affect whether the file is open for reading, writing, or for both. A subsequent ftruncate should not depend on access permission bits of the file, but solely on the read/write flags specified on the open(2). The bug affects a mailer Postfix, which reports a permission problem on ftruncate, affecting the smtpd service when option speed_adjust is requested. As the problem is in the file system violating a POSIX specification and not in the application, it is unlikely that the program will be modified. Reproducible on: FreeBSD 8.1-RELEASE-p2, ZFS: pool version 14, ZFS version 3 as well as on: FreeBSD 8.2-RC3, ZFS: pool version 15, ZFS version 4 >How-To-Repeat: Run the following test program. It will report: Error truncating: Permission denied when (cwd) on a ZFS file system, but will pass clean when on UFS or on some other file system. #include #include #include int main(int argc, char *argv[]) { const char fname[] = "truncate-posix-test.tmp"; /* POSIX.1-2008: ( http://www.opengroup.org/onlinepubs/9699919799/ ) * open() [...] O_CREAT [...] The file status flags and file * access modes of the open file description shall be set according * to the value of oflag. [...] The argument following the oflag * argument does not affect whether the file is open for reading, * writing, or for both. * * In other words, read/write access is controlled with the * O_RDWR flags, not the read/write permissions argument. * * Create a file with mode 0, i.e. all access permission bits off: */ int fd = open(fname, O_CREAT|O_RDWR|O_EXCL, 0); if (fd < 0) { perror("Error creating file"); return 1; } if (unlink(fname) < 0) perror("Error unlinking"); /* ftruncate should succeed, * it must not depend on access permission bits, its rights * should solely be governed by an O_RDWR file access flag. * * This FAILS on a ZFS file system, reporting "Permission denied"! */ if (ftruncate(fd,0) < 0) perror("Error truncating"); if (close(fd) < 0) perror("Error closing"); return 0; } >Fix: Fix unknown. Work around by not using ZFS, or by allowing less strict access permission bits on open(2) - which may be hard to achieve if code is buried inside some application. >Release-Note: >Audit-Trail: >Unformatted: