public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE
@ 2010-12-22 19:55 bruno at clisp dot org
  2012-02-18  8:39 ` [Bug hurd/12340] " tschwinge at sourceware dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bruno at clisp dot org @ 2010-12-22 19:55 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12340

           Summary: ttyname_r returns EINVAL instead of ERANGE
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: minor
          Priority: P2
         Component: hurd
        AssignedTo: roland@gnu.org
        ReportedBy: bruno@clisp.org


ttyname_r is specified in POSIX
<http://www.opengroup.org/onlinepubs/9699919799/functions/ttyname.html>.
The error condition "The value of namesize is smaller than the length of
the string to be returned" is identified with the error value ERANGE.
But sysdeps/mach/hurd/ttyname_r.c returns EINVAL in this case.
(Whereas sysdeps/posix/ttyname_r.c and sysdeps/unix/sysv/linux/ttyname_r.c
return ERANGE, as expected.)

Suggestion: Use ERANGE instead of EINVAL in sysdeps/mach/hurd/ttyname_r.c.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug hurd/12340] ttyname_r returns EINVAL instead of ERANGE
  2010-12-22 19:55 [Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE bruno at clisp dot org
@ 2012-02-18  8:39 ` tschwinge at sourceware dot org
  2012-02-21 19:48 ` roland at gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tschwinge at sourceware dot org @ 2012-02-18  8:39 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12340

Thomas Schwinge <tschwinge at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |simon at josefsson dot org,
                   |                            |tschwinge at sourceware dot
                   |                            |org

--- Comment #1 from Thomas Schwinge <tschwinge at sourceware dot org> 2012-02-18 08:38:22 UTC ---
Issue verified.  Patch has been posted at
<http://sourceware.org/ml/libc-alpha/2011-08/msg00013.html>, now verified. 
Used in Debian for some time,
<http://anonscm.debian.org/viewvc/pkg-glibc/glibc-package/trunk/debian/patches/hurd-i386/submitted-ttyname_ERANGE.diff>.
 Roland, OK to commit?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug hurd/12340] ttyname_r returns EINVAL instead of ERANGE
  2010-12-22 19:55 [Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE bruno at clisp dot org
  2012-02-18  8:39 ` [Bug hurd/12340] " tschwinge at sourceware dot org
@ 2012-02-21 19:48 ` roland at gnu dot org
  2012-04-04 22:40 ` tschwinge at sourceware dot org
  2014-06-30  6:20 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: roland at gnu dot org @ 2012-02-21 19:48 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12340

--- Comment #2 from Roland McGrath <roland at gnu dot org> 2012-02-21 19:45:36 UTC ---
Approved.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug hurd/12340] ttyname_r returns EINVAL instead of ERANGE
  2010-12-22 19:55 [Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE bruno at clisp dot org
  2012-02-18  8:39 ` [Bug hurd/12340] " tschwinge at sourceware dot org
  2012-02-21 19:48 ` roland at gnu dot org
@ 2012-04-04 22:40 ` tschwinge at sourceware dot org
  2014-06-30  6:20 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tschwinge at sourceware dot org @ 2012-04-04 22:40 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12340

Thomas Schwinge <tschwinge at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
         AssignedTo|roland at gnu dot org       |tschwinge at sourceware dot
                   |                            |org

--- Comment #3 from Thomas Schwinge <tschwinge at sourceware dot org> 2012-04-04 22:38:55 UTC ---
Committed in d653abb723919fb11f8573cdedf65505c0eca55f.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug hurd/12340] ttyname_r returns EINVAL instead of ERANGE
  2010-12-22 19:55 [Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE bruno at clisp dot org
                   ` (2 preceding siblings ...)
  2012-04-04 22:40 ` tschwinge at sourceware dot org
@ 2014-06-30  6:20 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30  6:20 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=12340

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-30  6:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-22 19:55 [Bug hurd/12340] New: ttyname_r returns EINVAL instead of ERANGE bruno at clisp dot org
2012-02-18  8:39 ` [Bug hurd/12340] " tschwinge at sourceware dot org
2012-02-21 19:48 ` roland at gnu dot org
2012-04-04 22:40 ` tschwinge at sourceware dot org
2014-06-30  6:20 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).