[3] in GSSAPI Development

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

GSSAPI errors

tytso@ATHENA.MIT.EDU (tytso@ATHENA.MIT.EDU)
Thu Apr 25 18:03:16 1991

Date: Wed, 24 Apr 91 14:41:16 EDT
From: tytso@athena.mit.edu
To: gssapi-dev@athena.mit.edu
Subject: GSSAPI errors

I've discussed this before, but I believe the #define's of the errors
(on page 11 of draft C of the C bindings spec) should be in upper case,
since that's a pretty standard C convention.

One other item which is a bit more important: I am uncomfortable with
the names of the calling erros, the routine errors, and the
supplementary status bits.  They all begin with GSS_S, and they
represent small numbers.

/*
 * Calling errors
 */
#define GSS_S_CALL_INACCESSIBLE_READ	1
#define GSS_S_CALL_INACCESSIBLE_WRITE	2
#define GSS_S_CALL_BAD_STRUCTURE	3

/*
 * Routine Errors
 */
#define GSS_S_BAD_MECH			1
#define GSS_S_BAD_NAME			2
#define GSS_S_BAD_NAMETYPE		3
	....

/*
 * Supplementary Status Bits
 */
#define GSS_S_CONTINUE_NEEDED	(1 << 0)
#define GSS_S_DUPLICATE_TOKEN	(1 << 1)
#define GSS_S_OLD_TOKEN		(1 << 2)
#define GSS_S_UNSEQ_TOKEN	(1 << 3)

#define GSS_S_COMPLETE		0

The problem with this scheme is that there's nothing to indicate that
this expression will do something other than what a programmer would
expect: 

	if (gss_calling_error(retval) == GSS_S_BAD_MECH) {
		...
	}

I propose that we rename the error codes so that the error codes use a
prefix GSS_CE for calling errors, GSS_RE for routine errors and GSS_SS
for supplementary status bits.  Comments?

						- Ted





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