All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Daniel J Walsh <dwalsh@redhat.com>, selinux@tycho.nsa.gov
Subject: Re: Bug in libselinux/src/setrans_client.c
Date: Mon, 06 Jan 2014 13:11:40 -0500	[thread overview]
Message-ID: <52CAF1DC.9080300@tycho.nsa.gov> (raw)
In-Reply-To: <52CAEF39.6020404@redhat.com>

On 01/06/2014 01:00 PM, Daniel J Walsh wrote:
> How is returning a ERRNO/ERROR for bad values hiding bugs from callers?  We
> are actually telling the callers what is bad.

Not really.  Stack trace is more informative than EINVAL, as the one
will show you exactly where you failed and what the arguments were,
whereas EINVAL could be a result of any of the arguments or a side
effect elsewhere in the function.  And the original functions that
prompted this discussion have never allowed you to pass NULL as
contexts.  Would you add a NULL check inside of every string.h function
in libc?

  reply	other threads:[~2014-01-06 18:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-21 14:03 Bug in libselinux/src/setrans_client.c Nicolas Iooss
     [not found] ` <CAPJdAQBu3=ZyEqUqn_eq4HagfGZZP3-9u_Taimozkkt4EjGfZg@mail.gmail.com>
2013-12-21 14:27   ` Nicolas Iooss
2013-12-23 14:46     ` Daniel J Walsh
2013-12-23 19:08       ` Stephen Smalley
2013-12-23 20:49         ` Nicolas Iooss
2013-12-25 14:36       ` Nicolas Iooss
2013-12-25 14:51         ` Francis Cunnane
2013-12-30 16:11         ` Stephen Smalley
2013-12-31  3:11           ` Matthew Thode
2013-12-31  7:33             ` Francis Cunnane
2013-12-31 18:52               ` Matthew Thode
2013-12-31 19:02                 ` Francis Cunnane
2014-01-06 15:56                 ` Daniel J Walsh
2014-01-06 17:49                   ` Stephen Smalley
2014-01-06 18:00                     ` Daniel J Walsh
2014-01-06 18:11                       ` Stephen Smalley [this message]
2014-01-06 20:59                         ` Daniel J Walsh
2014-01-07 13:59               ` Mailing list etiquette Stephen Smalley
2014-01-04 11:14           ` Bug in libselinux/src/setrans_client.c Nicolas Iooss
2013-12-31 15:33         ` Daniel J Walsh
2013-12-31 15:36         ` Daniel J Walsh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52CAF1DC.9080300@tycho.nsa.gov \
    --to=sds@tycho.nsa.gov \
    --cc=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.