From owner-freebsd-standards@FreeBSD.ORG Sun Jan 24 05:13:24 2010 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 100A11065672 for ; Sun, 24 Jan 2010 05:13:24 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id E99A08FC08 for ; Sun, 24 Jan 2010 05:13:23 +0000 (UTC) Received: by pzk40 with SMTP id 40so148260pzk.7 for ; Sat, 23 Jan 2010 21:13:23 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.143.24.32 with SMTP id b32mr3393456wfj.315.1264308654298; Sat, 23 Jan 2010 20:50:54 -0800 (PST) From: Juli Mallett Date: Sat, 23 Jan 2010 20:50:34 -0800 X-Google-Sender-Auth: 0b745736e100f6c3 Message-ID: To: freebsd-standards@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: wchar_t in inttypes.h and C++ 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, 24 Jan 2010 05:13:24 -0000 Hey folks, The handling of wchar_t in inttypes.h for wcsto*max(3) is currently broken in C++ where wchar_t is a built-in type and not derived from __wchar_t. I have a patch to define wchar_t if it isn't defined in C and to use wchar_t in the declarations rather than __wchar_t as we do today, as is done in other headers that declare wchar_t functions. BDE doesn't like it -- certainly it's unclear that it would be okay for inttypes.h to define wchar_t in C -- but I'm not sure there's a markedly-better alternative. We could define a type ___wchar_t (or something like) that is a typedef of __wchar_t in C and a typedef of wchar_t in C++. We could define wcsto*max(3) differently for C++ and C. We could declare the functions as taking wchar_t but only define them if wchar_t has been defined (or we're compiling for C++). For the sake of argument, here's the inttypes.h patch that follows the lead of stdlib.h: http://people.freebsd.org/~jmallett/wchar-inttypes.diff Thanks, Juli. From owner-freebsd-standards@FreeBSD.ORG Mon Jan 25 11:07:10 2010 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 C1C56106568D for ; Mon, 25 Jan 2010 11:07:10 +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 AE4EB8FC2C for ; Mon, 25 Jan 2010 11:07:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PB7AnD038906 for ; Mon, 25 Jan 2010 11:07:10 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0PB7AN6038904 for freebsd-standards@FreeBSD.org; Mon, 25 Jan 2010 11:07:10 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 25 Jan 2010 11:07:10 GMT Message-Id: <201001251107.o0PB7AN6038904@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, 25 Jan 2010 11:07:10 -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/142803 standards j0 Bessel function inaccurate near zeros of the functi o stand/142255 standards scandir prototype in dirent.h isn't compliant with POS s stand/141705 standards [libc] [request] libc lacks cexp (and friends) o stand/135307 standards Boot Loader problem on Acer Aspire 5735 o stand/130067 standards Wrong numeric limits in system headers? o stand/129524 standards FreeBSD 7.0 isnt detecting my hardrives with raid5 o stand/129196 standards Inconsistent errno in strtol() o bin/125855 standards sh(1) allows for multiline, non-escaped control struct 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/121568 standards [patch] ln(1): wrong "ln -s" behaviour o stand/120947 standards xsm ignores system.xsm and .xsmstartup 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 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/96016 standards [headers] clock_getres et al should be in o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm 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 cd9660 unicode support simple hack o stand/54839 standards [pcvt] pcvt deficits o stand/54833 standards [pcvt] more pcvt deficits 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/44425 standards getcwd() succeeds even if current dir has perm 000. p stand/41576 standards POSIX compliance of ln(1) o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings s stand/36076 standards Implementation of POSIX fuser command o kern/27835 standards [libc] execve() doesn't conform to execve(2) spec in s 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 bin/24390 standards ln(1) Replacing old dir-symlinks when using /bin/ln o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 50 problems total. From owner-freebsd-standards@FreeBSD.ORG Wed Jan 27 22:33:39 2010 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 86FD810656A4 for ; Wed, 27 Jan 2010 22:33:39 +0000 (UTC) (envelope-from cyrille.lefevre-lists@laposte.net) Received: from out6.laposte.net (out5.laposte.net [193.251.214.122]) by mx1.freebsd.org (Postfix) with ESMTP id 19E398FC20 for ; Wed, 27 Jan 2010 22:33:38 +0000 (UTC) Received: from out5.laposte.net (lbao93aubmepnpf001-184-pip.meplus.info [10.98.51.10]) by mwinf8405.laposte.net (SMTP Server) with ESMTP id 9B1D51C003A1 for ; Wed, 27 Jan 2010 22:59:20 +0100 (CET) Received: from meplus.info (localhost [127.0.0.1]) by mwinf8408.laposte.net (SMTP Server) with ESMTP id 99F827001275; Wed, 27 Jan 2010 22:59:18 +0100 (CET) Received: from [192.168.1.133] (137.228.100-84.rev.gaoland.net [84.100.228.137]) by mwinf8408.laposte.net (SMTP Server) with ESMTP id 345C370011A9; Wed, 27 Jan 2010 22:59:17 +0100 (CET) X-ME-UUID: 20100127215918214.345C370011A9@mwinf8408.laposte.net Message-ID: <4B60B734.7060803@laposte.net> Date: Wed, 27 Jan 2010 22:59:16 +0100 From: Cyrille Lefevre Organization: ACME User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: jhell References: <4B5CEC53.3090402@laposte.net> <20100125025744.GA94378@orion.hsd1.pa.comcast.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-me-spamlevel: not-spam X-me-spamrating: 33.599998 X-me-spamcause: OK, (-160)(0000)gggruggvucftvghtrhhoucdtuddrvdeltddruddtucetggdotefuucfrrhhofhhilhgvmecuoehnohhnvgeqnecuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculddvtddmneesvcftvggtihhpihgvnhhtshculddquddttddmneculddquddttddmnehfrhgvvggsshgufeigucdlqdeftddmnehfrhgvvggsshgugdculddquddtmdenuefuffdvgiculddqvddtmdenghgvnhgvrhhitgdjucdlfedtmdenthhoucgthhgrthculdehtddm Cc: freebsd-stable@freebsd.org, freebsd-standards@freebsd.org, Glen Barber Subject: Re: su password prompt to stdout instead of /dev/tty 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: Wed, 27 Jan 2010 22:33:39 -0000 sorry, repost to -standards w/ an s ! jhell a =E9crit : > On Sun, 24 Jan 2010 21:57, glen.j.barber@ wrote: >> >> Cyrille Lefevre wrote: >>> >>> su password prompt is displayed to *stdout* instead of */dev/tty*. >>> >>> # su user >>> $ su root -c date > /tmp/date 2>&1 >>> (nothing displayed) >>> $ cat /tmp/date >>> Password:su: Sorry >>> $ uname -a >>> FreeBSD freebsd8.my.domain 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat No= v >>> 21 15:48:17 UTC 2009 >>> root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >>> >>> I suppose this is a getpass() problem ? >>> >=20 > This is intended operation as su(1) may not always be affiliated with a= =20 > TTY. This leaves it open for a script to chat with much like what samba= =20 > does with its passwd chat mechanism. just to feed the debate : aix 5.2 : prompt to tty hp-ux : prompt to stderr netbsd : prompt to tty solaris 9 : prompt to stderr solaris 10 : prompt to tty openbsd : prompt to tty ubuntu : prompt to stderr freebsd is the only one which prompt to stdout ! IMHO, it should at least prompt to stderr if not tty... and report errors to stderr as usually. CC -standards Regards, Cyrille Lefevre --=20 mailto:Cyrille.Lefevre-lists@laposte.net _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"= From owner-freebsd-standards@FreeBSD.ORG Fri Jan 29 00:16:50 2010 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 D8378106566C; Fri, 29 Jan 2010 00:16:50 +0000 (UTC) (envelope-from cyrille.lefevre-lists@laposte.net) Received: from out3.laposte.net (out4.laposte.net [193.251.214.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6D7D58FC0C; Fri, 29 Jan 2010 00:16:50 +0000 (UTC) Received: from meplus.info (localhost [127.0.0.1]) by mwinf8314.laposte.net (SMTP Server) with ESMTP id 9C07C70013A7; Fri, 29 Jan 2010 01:16:48 +0100 (CET) Received: from [192.168.1.133] (137.228.100-84.rev.gaoland.net [84.100.228.137]) by mwinf8314.laposte.net (SMTP Server) with ESMTP id 37C5970013A6; Fri, 29 Jan 2010 01:16:48 +0100 (CET) X-ME-UUID: 20100129001648228.37C5970013A6@mwinf8314.laposte.net Message-ID: <4B6228EF.5050400@laposte.net> Date: Fri, 29 Jan 2010 01:16:47 +0100 From: Cyrille Lefevre Organization: ACME User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: jhell References: <4B5CEC53.3090402@laposte.net> <20100125025744.GA94378@orion.hsd1.pa.comcast.net> <4B60B734.7060803@laposte.net> In-Reply-To: <4B60B734.7060803@laposte.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-me-spamlevel: not-spam X-me-spamrating: 32.799999 X-me-spamcause: OK, (-180)(0000)gggruggvucftvghtrhhoucdtuddrvdeltddrudduucetggdotefuucfrrhhofhhilhgvmecuoehnohhnvgeqnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucdlqddutddtmdenfhhrvggvsghsugefgiculddqfedtmdenfhhrvggvsghsugdgucdlqddutddmneeuufffvdigucdlqddvtddmnehgvghnvghrihgtjdculdeftddmnehtohcutghhrghtucdlhedtmd Cc: freebsd-standards@freebsd.org, freebsd-stable@freebsd.org, Glen Barber Subject: Re: su password prompt to stdout instead of /dev/tty 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, 29 Jan 2010 00:16:50 -0000 Cyrille Lefevre a =E9crit : >=20 >=20 > sorry, repost to -standards w/ an s ! >=20 > jhell a =E9crit : >> On Sun, 24 Jan 2010 21:57, glen.j.barber@ wrote: >>> >>> Cyrille Lefevre wrote: >>>> >>>> su password prompt is displayed to *stdout* instead of */dev/tty*. >>>> >>>> # su user >>>> $ su root -c date > /tmp/date 2>&1 >>>> (nothing displayed) >>>> $ cat /tmp/date >>>> Password:su: Sorry >>>> $ uname -a >>>> FreeBSD freebsd8.my.domain 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat N= ov >>>> 21 15:48:17 UTC 2009 >>>> root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >>>> >>>> I suppose this is a getpass() problem ? >>>> >> >> This is intended operation as su(1) may not always be affiliated with = >> a TTY. This leaves it open for a script to chat with much like what=20 >> samba does with its passwd chat mechanism. >=20 > just to feed the debate : >=20 > aix 5.2 : prompt to tty > hp-ux : prompt to stderr > netbsd : prompt to tty > solaris 9 : prompt to stderr > solaris 10 : prompt to tty > openbsd : prompt to tty > ubuntu : prompt to stderr >=20 > freebsd is the only one which prompt to stdout ! > IMHO, it should at least prompt to stderr if not tty... > and report errors to stderr as usually. >=20 > CC -standards found it, the guilty is prompt() in=20 src/contrib/openpam/lib/openpam_ttyconv.c and not getpass() as usual... =3D> fputs(msg, stdout); which should be, IMHO, something like : FILE *ttyp; ttyp =3D fopen("/dev/tty", "w") if (!stdtty) ttyp =3D isatty(fileno(stderr)) ? stderr : stdout; fputs(msg, ttyp); or, at least : fputs(msg, stderr); Regards, Cyrille Lefevre --=20 mailto:Cyrille.Lefevre-lists@laposte.net From owner-freebsd-standards@FreeBSD.ORG Fri Jan 29 00:51:47 2010 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 51EE01065672 for ; Fri, 29 Jan 2010 00:51:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id D32618FC14 for ; Fri, 29 Jan 2010 00:51:46 +0000 (UTC) Received: (qmail 18523 invoked by uid 399); 29 Jan 2010 00:25:06 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 29 Jan 2010 00:25:06 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B622AE6.2060501@FreeBSD.org> Date: Thu, 28 Jan 2010 16:25:10 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100123 Thunderbird/3.0.1 MIME-Version: 1.0 To: Cyrille Lefevre References: <4B5CEC53.3090402@laposte.net> <20100125025744.GA94378@orion.hsd1.pa.comcast.net> <4B60B734.7060803@laposte.net> <4B6228EF.5050400@laposte.net> In-Reply-To: <4B6228EF.5050400@laposte.net> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: jhell , freebsd-standards@freebsd.org, freebsd-stable@freebsd.org, Glen Barber Subject: Re: su password prompt to stdout instead of /dev/tty 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, 29 Jan 2010 00:51:47 -0000 Has anyone checked what POSIX has to say about this? And does this issue affect more than just su? Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-freebsd-standards@FreeBSD.ORG Fri Jan 29 01:38:50 2010 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 EE5B0106566C; Fri, 29 Jan 2010 01:38:50 +0000 (UTC) (envelope-from cyrille.lefevre-lists@laposte.net) Received: from out1.laposte.net (out2.laposte.net [193.251.214.119]) by mx1.freebsd.org (Postfix) with ESMTP id AAF7E8FC14; Fri, 29 Jan 2010 01:38:50 +0000 (UTC) Received: from meplus.info (localhost [127.0.0.1]) by mwinf8209.laposte.net (SMTP Server) with ESMTP id DEDF97000083; Fri, 29 Jan 2010 02:38:49 +0100 (CET) Received: from [192.168.1.133] (137.228.100-84.rev.gaoland.net [84.100.228.137]) by mwinf8209.laposte.net (SMTP Server) with ESMTP id 648B47000082; Fri, 29 Jan 2010 02:38:49 +0100 (CET) X-ME-UUID: 20100129013849411.648B47000082@mwinf8209.laposte.net Message-ID: <4B623C29.3090504@laposte.net> Date: Fri, 29 Jan 2010 02:38:49 +0100 From: Cyrille Lefevre Organization: ACME User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Doug Barton References: <4B5CEC53.3090402@laposte.net> <20100125025744.GA94378@orion.hsd1.pa.comcast.net> <4B60B734.7060803@laposte.net> <4B6228EF.5050400@laposte.net> <4B622AE6.2060501@FreeBSD.org> In-Reply-To: <4B622AE6.2060501@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-me-spamlevel: not-spam X-me-spamrating: 36.000000 X-me-spamcause: OK, (-100)(0000)gggruggvucftvghtrhhoucdtuddrvdeltddrudduucetggdotefuucfrrhhofhhilhgvmecuoehnohhnvgeqnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Cc: jhell , freebsd-standards@freebsd.org, freebsd-stable@freebsd.org, Glen Barber Subject: Re: su password prompt to stdout instead of /dev/tty 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, 29 Jan 2010 01:38:51 -0000 Doug Barton a =E9crit : >=20 > Has anyone checked what POSIX has to say about this? And does this issu= e=20 > affect more than just su? Hi, su isn't posix, not the susv4 way at least ! Regards, Cyrille Lefevre --=20 mailto:Cyrille.Lefevre-lists@laposte.net From owner-freebsd-standards@FreeBSD.ORG Fri Jan 29 08:02:38 2010 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 73256106566B; Fri, 29 Jan 2010 08:02:38 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id ED4E98FC12; Fri, 29 Jan 2010 08:02:37 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id o0T82AHn050044; Fri, 29 Jan 2010 09:02:26 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id o0T829sd050043; Fri, 29 Jan 2010 09:02:09 +0100 (CET) (envelope-from olli) Date: Fri, 29 Jan 2010 09:02:09 +0100 (CET) Message-Id: <201001290802.o0T829sd050043@lurza.secnetix.de> From: Oliver Fromme To: freebsd-standards@FreeBSD.ORG, cyrille.lefevre-lists@laposte.net, jhell@DataIX.net, freebsd-stable@FreeBSD.ORG, glen.j.barber@gmail.com In-Reply-To: <4B6228EF.5050400@laposte.net> X-Newsgroups: list.freebsd-standards User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 29 Jan 2010 09:02:26 +0100 (CET) Cc: Subject: Re: su password prompt to stdout instead of /dev/tty 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, 29 Jan 2010 08:02:38 -0000 Cyrille Lefevre wrote: > found it, the guilty is prompt() in > src/contrib/openpam/lib/openpam_ttyconv.c and not getpass() as usual... Are you sure this affects su(1) only? > => fputs(msg, stdout); > > which should be, IMHO, something like : > > FILE *ttyp; > ttyp = fopen("/dev/tty", "w") > if (!stdtty) > ttyp = isatty(fileno(stderr)) ? stderr : stdout; > fputs(msg, ttyp); > > or, at least : > > fputs(msg, stderr); As long as it's still possible to easily redirect the prompt on the command line, it's fine with me. Right now I can do this in a script: echo -n "$myprompt: " ; su $somerole >/dev/null ... If that doesn't work anymore, I'll complain. ;-) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead." -- RFC 1925 From owner-freebsd-standards@FreeBSD.ORG Fri Jan 29 09:17:09 2010 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 7506E106566C for ; Fri, 29 Jan 2010 09:17:09 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [76.96.30.56]) by mx1.freebsd.org (Postfix) with ESMTP id 594C88FC21 for ; Fri, 29 Jan 2010 09:17:09 +0000 (UTC) Received: from omta03.emeryville.ca.mail.comcast.net ([76.96.30.27]) by qmta06.emeryville.ca.mail.comcast.net with comcast id bM3T1d0010b6N64A6M40sN; Fri, 29 Jan 2010 09:04:00 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta03.emeryville.ca.mail.comcast.net with comcast id bM3y1d0053S48mS8PM3zky; Fri, 29 Jan 2010 09:03:59 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id C81011E3033; Fri, 29 Jan 2010 01:03:57 -0800 (PST) Date: Fri, 29 Jan 2010 01:03:57 -0800 From: Jeremy Chadwick To: Oliver Fromme Message-ID: <20100129090357.GA38872@icarus.home.lan> References: <4B6228EF.5050400@laposte.net> <201001290802.o0T829sd050043@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001290802.o0T829sd050043@lurza.secnetix.de> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: jhell@DataIX.net, freebsd-standards@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, glen.j.barber@gmail.com Subject: Re: su password prompt to stdout instead of /dev/tty 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, 29 Jan 2010 09:17:09 -0000 On Fri, Jan 29, 2010 at 09:02:09AM +0100, Oliver Fromme wrote: > Cyrille Lefevre wrote: > > found it, the guilty is prompt() in > > src/contrib/openpam/lib/openpam_ttyconv.c and not getpass() as usual... > > Are you sure this affects su(1) only? > > > => fputs(msg, stdout); > > > > which should be, IMHO, something like : > > > > FILE *ttyp; > > ttyp = fopen("/dev/tty", "w") > > if (!stdtty) > > ttyp = isatty(fileno(stderr)) ? stderr : stdout; > > fputs(msg, ttyp); > > > > or, at least : > > > > fputs(msg, stderr); > > As long as it's still possible to easily redirect the prompt > on the command line, it's fine with me. > Right now I can do this in a script: > > echo -n "$myprompt: " ; su $somerole >/dev/null ... > > If that doesn't work anymore, I'll complain. ;-) OpenPAM is des@'s responsibility. Has anyone brought this up to him? -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-standards@FreeBSD.ORG Sat Jan 30 12:51:29 2010 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 0676510656C5; Sat, 30 Jan 2010 12:51:29 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D1A838FC0A; Sat, 30 Jan 2010 12:51:28 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0UCpS95077710; Sat, 30 Jan 2010 12:51:28 GMT (envelope-from gavin@freefall.freebsd.org) Received: (from gavin@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0UCpSEP077706; Sat, 30 Jan 2010 12:51:28 GMT (envelope-from gavin) Date: Sat, 30 Jan 2010 12:51:28 GMT Message-Id: <201001301251.o0UCpSEP077706@freefall.freebsd.org> To: gavin@FreeBSD.org, freebsd-amd64@FreeBSD.org, freebsd-standards@FreeBSD.org From: gavin@FreeBSD.org Cc: Subject: Re: standards/143358: nearbyint raises spurious inexact exception 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, 30 Jan 2010 12:51:29 -0000 Synopsis: nearbyint raises spurious inexact exception Responsible-Changed-From-To: freebsd-amd64->freebsd-standards Responsible-Changed-By: gavin Responsible-Changed-When: Sat Jan 30 12:47:54 UTC 2010 Responsible-Changed-Why: This is (verified) not amd64 specific, it seems to be a regression in 8.0. I think -standards may be the best place for this PR, although I'll also ping das@ about it. Note that a comment in the function itself in lib/msun/src/s_nearbyint.c does also suggest that this PR is valid, "We save and restore the floating-point environment to avoid raising an inexact exception." I've also verified Solaris 10, Linux and FreeBSD 7.2 show the expected behaviour. http://www.freebsd.org/cgi/query-pr.cgi?pr=143358 From owner-freebsd-standards@FreeBSD.ORG Sat Jan 30 15:20:35 2010 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 4A172106566C; Sat, 30 Jan 2010 15:20:35 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id B95B48FC1B; Sat, 30 Jan 2010 15:20:34 +0000 (UTC) Received: from c122-106-174-165.carlnfd1.nsw.optusnet.com.au (c122-106-174-165.carlnfd1.nsw.optusnet.com.au [122.106.174.165]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0UFKUbf001197 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 31 Jan 2010 02:20:32 +1100 Date: Sun, 31 Jan 2010 02:20:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: gavin@freebsd.org In-Reply-To: <201001301251.o0UCpSEP077706@freefall.freebsd.org> Message-ID: <20100131014341.J78095@delplex.bde.org> References: <201001301251.o0UCpSEP077706@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: das@freebsd.org, freebsd-standards@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: standards/143358: nearbyint raises spurious inexact exception 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, 30 Jan 2010 15:20:35 -0000 On Sat, 30 Jan 2010 gavin@freebsd.org wrote: > Synopsis: nearbyint raises spurious inexact exception > Note that a comment in the function itself in lib/msun/src/s_nearbyint.c > does also suggest that this PR is valid, "We save and restore the > floating-point environment to avoid raising an inexact exception." I've > also verified Solaris 10, Linux and FreeBSD 7.2 show the expected behaviour. This seems to be a bug in gcc-4.2, or perhaps a bug in the inline asms. gcc-4.2 still works with -O0, but with -O it removes the entire fesetenv() in nearbyint(). The fegetenv() isn't removed though its result is never used. I didn't get anywhere good trying to fix this, but I got to the following worse place of interest: after replacing the fesetenv(&env) by fesetenv(&xenv) where xenv is an invalidly initialized global variable (all 0's), the fegetenv(&env) corrupted the current environment (looks a bit like xenv was used to initialize the current environment). Removing fesetenv() in other contexts would give larger bugs. Bruce From owner-freebsd-standards@FreeBSD.ORG Sat Jan 30 18:11:51 2010 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 7B40B106566B; Sat, 30 Jan 2010 18:11:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id BED6E8FC0C; Sat, 30 Jan 2010 18:11:50 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0UIBj0W071673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Jan 2010 20:11:45 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0UIBjBK084343; Sat, 30 Jan 2010 20:11:45 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0UIBj6t084342; Sat, 30 Jan 2010 20:11:45 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Jan 2010 20:11:45 +0200 From: Kostik Belousov To: Bruce Evans Message-ID: <20100130181145.GA3877@deviant.kiev.zoral.com.ua> References: <201001301251.o0UCpSEP077706@freefall.freebsd.org> <20100131014341.J78095@delplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lWZ9pouYHbrmKLtT" Content-Disposition: inline In-Reply-To: <20100131014341.J78095@delplex.bde.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: das@freebsd.org, gavin@freebsd.org, freebsd-standards@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: standards/143358: nearbyint raises spurious inexact exception 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, 30 Jan 2010 18:11:51 -0000 --lWZ9pouYHbrmKLtT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 31, 2010 at 02:20:30AM +1100, Bruce Evans wrote: > On Sat, 30 Jan 2010 gavin@freebsd.org wrote: >=20 > >Synopsis: nearbyint raises spurious inexact exception >=20 > >Note that a comment in the function itself in lib/msun/src/s_nearbyint.c > >does also suggest that this PR is valid, "We save and restore the > >floating-point environment to avoid raising an inexact exception." I've > >also verified Solaris 10, Linux and FreeBSD 7.2 show the expected=20 > >behaviour. >=20 > This seems to be a bug in gcc-4.2, or perhaps a bug in the inline asms. > gcc-4.2 still works with -O0, but with -O it removes the entire fesetenv() > in nearbyint(). The fegetenv() isn't removed though its result is never > used. I didn't get anywhere good trying to fix this, but I got to the > following worse place of interest: after replacing the fesetenv(&env) by > fesetenv(&xenv) where xenv is an invalidly initialized global variable > (all 0's), the fegetenv(&env) corrupted the current environment (looks > a bit like xenv was used to initialize the current environment). >=20 > Removing fesetenv() in other contexts would give larger bugs. While looking at this, I tried to run the example on custom-build gcc 4.4.3/binutils 2.20 toolchain, and bumped into the issue fixed by http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3eac7944b4112632ad6= fb257c7ce31deda72d89f --lWZ9pouYHbrmKLtT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktkdmAACgkQC3+MBN1Mb4hasgCfZQ3GFXJIWUX++8mi6QjlfaMP czMAoMCz9Zw3TohtRMr8EkYKCpEH6F3J =ZL8P -----END PGP SIGNATURE----- --lWZ9pouYHbrmKLtT-- From owner-freebsd-standards@FreeBSD.ORG Sat Jan 30 19:01:58 2010 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 CF910106566C; Sat, 30 Jan 2010 19:01:58 +0000 (UTC) (envelope-from das@freebsd.org) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 891038FC1C; Sat, 30 Jan 2010 19:01:58 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o0UJ1v6x064405; Sat, 30 Jan 2010 14:01:57 -0500 (EST) (envelope-from das@freebsd.org) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o0UJ1v7m064404; Sat, 30 Jan 2010 14:01:57 -0500 (EST) (envelope-from das@freebsd.org) Date: Sat, 30 Jan 2010 14:01:57 -0500 From: David Schultz To: Kostik Belousov Message-ID: <20100130190157.GB63954@zim.MIT.EDU> Mail-Followup-To: Kostik Belousov , Bruce Evans , gavin@freebsd.org, freebsd-standards@freebsd.org, freebsd-amd64@freebsd.org References: <201001301251.o0UCpSEP077706@freefall.freebsd.org> <20100131014341.J78095@delplex.bde.org> <20100130181145.GA3877@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100130181145.GA3877@deviant.kiev.zoral.com.ua> Cc: gavin@freebsd.org, freebsd-standards@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: standards/143358: nearbyint raises spurious inexact exception 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, 30 Jan 2010 19:01:59 -0000 On Sat, Jan 30, 2010, Kostik Belousov wrote: > On Sun, Jan 31, 2010 at 02:20:30AM +1100, Bruce Evans wrote: > > On Sat, 30 Jan 2010 gavin@freebsd.org wrote: > > > > >Synopsis: nearbyint raises spurious inexact exception > > > > >Note that a comment in the function itself in lib/msun/src/s_nearbyint.c > > >does also suggest that this PR is valid, "We save and restore the > > >floating-point environment to avoid raising an inexact exception." I've > > >also verified Solaris 10, Linux and FreeBSD 7.2 show the expected > > >behaviour. > > > > This seems to be a bug in gcc-4.2, or perhaps a bug in the inline asms. > > gcc-4.2 still works with -O0, but with -O it removes the entire fesetenv() > > in nearbyint(). The fegetenv() isn't removed though its result is never > > used. I didn't get anywhere good trying to fix this, but I got to the > > following worse place of interest: after replacing the fesetenv(&env) by > > fesetenv(&xenv) where xenv is an invalidly initialized global variable > > (all 0's), the fegetenv(&env) corrupted the current environment (looks > > a bit like xenv was used to initialize the current environment). > > > > Removing fesetenv() in other contexts would give larger bugs. > > While looking at this, I tried to run the example on custom-build > gcc 4.4.3/binutils 2.20 toolchain, and bumped into the issue fixed > by > http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3eac7944b4112632ad6fb257c7ce31deda72d89f Hmm, we should fix that, but I think it's orthogonal to the issue in the PR. Here's the code I'm getting with -O2: nearbyint: .LFB9: subq $56, %rsp .LCFI1: movsd %xmm0, 8(%rsp) leaq 16(%rsp), %rdi call fegetenv #APP fldenv 16(%rsp) ldmxcsr 44(%rsp) #NO_APP movsd 8(%rsp), %xmm0 call rint addq $56, %rsp ret gcc isn't removing the fesetenv(); it's actually moving the fesetenv() to before the rint() call. I believe the bug is that gcc is using incorrect builtin knowledge that the rint() function is pure. FreeBSD doesn't declare it this way because that would be wrong; rint() depends upon and modifies the floating point environment. When I compile with -fno-builtins, the resulting code is correct. I can't think of any good workarounds except using -fno-builtin or making a _rint() alias for rint() to trick gcc. This is related to a long-standing and thorny issue with gcc, namely, that it doesn't understand how to cope with code that modifies or examines the floating point environment (rounding modes, exception flags, etc.) Basically, it assumes that all floating point arithmetic is performed in the default environment, and has no side effects. Implementing C99's FENV_ACCESS pragma to address this has been on their todo list for years, but it's a big task.