[19062] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: Assigning 64-bit errcode_t to 32-bit krb5_error_code

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Dec 5 12:02:36 2014

Message-ID: <5481E510.5020305@mit.edu>
Date: Fri, 05 Dec 2014 12:02:08 -0500
From: Greg Hudson <ghudson@mit.edu>
MIME-Version: 1.0
To: Tomas Kuthan <tomas.kuthan@oracle.com>, krbdev@mit.edu
In-Reply-To: <54818C26.1090100@oracle.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

On 12/05/2014 05:42 AM, Tomas Kuthan wrote:
> Is there anything (besides common sense) forbidding errcode_t values 
> overflowing 32-bit integer?

errcode_t and krb5_error_code are both intended to hold com_err codes,
which are 32-bit values.  A profile plugin module could return a larger
value, but it would be incorrect to do so.

The type "long" was chosen for errcode_t at a time when there were
platforms with 16-bit ints to worry about, and there were no C99
fixed-width types to take advantage of.
_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post