-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/06/2014 01:11 PM, Stephen Smalley wrote: > 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? > > > > _______________________________________________ Selinux mailing list > Selinux@xxxxxxxxxxxxx To unsubscribe, send email to > Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" > to Selinux-request@xxxxxxxxxxxxx. > > - From a programmer point of view yes, but from an enterprise point of view no. I would prefer the apps to have a chance to reasonably fail. Our functions define return codes, while functions like strlen, strcmp and strcp do not have failure modes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLLGSgACgkQrlYvE4MpobOb/ACg5bJKo8bGUHXpWVZyA6NpUo/v jBIAn0OUcGiVnVLiSibgssvOLOqjem6o =uKuI -----END PGP SIGNATURE----- _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.