g_dsp_status.c revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * glue routine gss_display_status 2N/A /* we handle major status codes, and the mechs do the minor */ 2N/A * must be the minor status - let mechs do the work 2N/A * select the appropriate underlying mechanism routine and 2N/A * In this version, we only handle status codes that have been 2N/A * mapped to a flat numbering space. Look up the value we got 2N/A * passed. If it's not found, complain. 2N/A /* Magic flag for com_err values. */ 2N/A * How's this for weird? If we get an error returning the 2N/A * mechanism-specific error code, we save away the 2N/A * mechanism-specific error code describing the error. 2N/A}
/* gss_display_status */ 2N/A * function to map the major error codes 2N/A * it uses case statements so that the strings could be wrapped by gettext 2N/A * msgCtxt is interpreted as: 2N/A * >= 2 - the supplementary error code bit shifted by 1 2N/A /* take care of the success value first */ 2N/A "The routine completed successfully");
2N/A "A required input parameter" 2N/A " could not be read");
2N/A "A required output parameter" 2N/A " could not be written");
2N/A "A parameter was malformed");
2N/A "An invalid status code was supplied");
2N/A /* we now need to determine new value of msgCtxt */ 2N/A "An unsupported mechanism" 2N/A "An invalid name was supplied");
2N/A "A supplied name was of an" 2N/A " unsupported type");
2N/A "Incorrect channel bindings" 2N/A "A token had an invalid Message" 2N/A " Integrity Check (MIC)");
2N/A "No credentials were supplied, or the" 2N/A " credentials were unavailable or" 2N/A "No context has been established");
2N/A "Invalid token was supplied");
2N/A "Invalid credential was supplied");
2N/A "The referenced credential has" 2N/A "The referenced context has expired");
2N/A "Unspecified GSS failure. Minor code" 2N/A " may provide more information");
2N/A "The quality-of-protection (QOP) " 2N/A "requested could not be provided");
2N/A "The operation is forbidden by local" 2N/A " security policy");
2N/A "The operation or option is not" 2N/A " available or unsupported");
2N/A "The requested credential element" 2N/A "The provided name was not mechanism" 2N/A "An invalid status code was supplied");
2N/A /* we must determine if the caller should call us again */ 2N/A * if msgCtxt is not 0, then it should encode 2N/A * the supplementary error code we should be printing 2N/A /* we display the errors LSB first */ 2N/A for (i = 0; i <
16; i++) {
2N/A /* isolate the bit or if not found set to illegal value */ 2N/A "The routine must be called again to" 2N/A " complete its function");
2N/A "The token was a duplicate of an" 2N/A "The token's validity period" 2N/A "A later token has already been" 2N/A "An expected per-message token was" 2N/A "An invalid status code was supplied");
2N/A * we must check if there is any other supplementary errors 2N/A * if found, then turn off current bit, and store next value 2N/A * in msgCtxt shifted by 1 bit 2N/A "An invalid status code was supplied");
2N/A /* now copy the status code and return to caller */