250 lines
6.3 KiB
HTML
250 lines
6.3 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>gss_inquire_cred()--Get Information About GSS Credential</title>
|
||
|
<!-- Begin Header Records ========================================== -->
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- Edited by Kersten Jan 02 -->
|
||
|
<!-- Created by Kent Hofer for V5R1 -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- End Header Records -->
|
||
|
<!--Java sync-link-->
|
||
|
<script type="text/javascript" language="javascript" src="../rzahg/synch.js">
|
||
|
</script>
|
||
|
|
||
|
<a name="top_of_page"></a>
|
||
|
|
||
|
<h2>gss_inquire_cred()--Get Information About GSS Credential</h2>
|
||
|
|
||
|
<div class="box" style="width: 70%;">
|
||
|
<br>
|
||
|
Syntax
|
||
|
|
||
|
<pre>
|
||
|
#include <gssapi.h>
|
||
|
|
||
|
OM_uint32 gss_inquire_cred (
|
||
|
OM_uint32 * <em>minor_status</em>,
|
||
|
gss_cred_id_t <em>cred_handle</em>,
|
||
|
gss_name_t * <em>name</em>,
|
||
|
OM_uint32 * <em>lifetime</em>,
|
||
|
gss_cred_usage_t * <em>cred_usage</em>,
|
||
|
gss_OID_set * <em>mechanisms</em>);
|
||
|
</pre>
|
||
|
|
||
|
Service Program Name: QSYS/QKRBGSS<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default public authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<p>The <strong>gss_inquire_cred()</strong> function returns information about a
|
||
|
GSS credential to the calling application. If
|
||
|
<strong>GSS_C_NO_CREDENTIAL</strong> is specified for the <em>cred_handle</em>
|
||
|
parameter, the default security mechanism is used to process the request.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Parameters</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>minor_status</strong> (Output)</dt>
|
||
|
|
||
|
<dd>A status code from the security mechanism.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>cred_handle</strong> (Input)</dt>
|
||
|
|
||
|
<dd>The handle for the GSS credential. Specify
|
||
|
<strong>GSS_C_NO_CREDENTIAL</strong> to get information about the default
|
||
|
credential for the default security mechanism.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>name</strong> (Output)</dt>
|
||
|
|
||
|
<dd>The principal name associated with the credential. Specify
|
||
|
<strong>NULL</strong> for this parameter if the principal name is not
|
||
|
required.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>lifetime</strong> (Output)</dt>
|
||
|
|
||
|
<dd>The number of seconds for which the credential remains valid. The returned
|
||
|
value is zero if the credential has expired. Specify <strong>NULL</strong> for
|
||
|
this parameter if the credential lifetime is not required.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>cred_usage</strong> (Output)</dt>
|
||
|
|
||
|
<dd>One of the following values describing how the application can use the
|
||
|
credential. Specify <strong>NULL</strong> for this parameter if the credential
|
||
|
usage is not required.<br>
|
||
|
<br>
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top" nowrap><em>GSS_C_INITIATE</em></td>
|
||
|
<td align="left" valign="top">The application may initiate a security
|
||
|
context.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>GSS_C_ACCEPT</em></td>
|
||
|
<td align="left" valign="top">The application may accept a security
|
||
|
context.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>GSS_C_BOTH</em></td>
|
||
|
<td align="left" valign="top">The application may both initiate and accept
|
||
|
security contexts.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>mechanisms</strong> (Output)</dt>
|
||
|
|
||
|
<dd>The set of security mechanisms supported by the credential. Specify
|
||
|
<strong>NULL</strong> for this parameter if the mechanism set is not required.
|
||
|
The gss_OID_set returned for this parameter should be released when it is no
|
||
|
longer needed by calling the <strong>gss_release_oid_set()</strong>
|
||
|
routine.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Return Value</h3>
|
||
|
|
||
|
<p>The return value is one of the following status codes:</p>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>GSS_S_COMPLETE</strong></dt>
|
||
|
|
||
|
<dd>The routine completed successfully.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>GSS_S_CREDENTIALS_EXPIRED</strong></dt>
|
||
|
|
||
|
<dd>The credentials have expired. Credential information is still returned for
|
||
|
an expired credential, but the <em>lifetime</em> value is returned as zero.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>GSS_S_DEFECTIVE_CREDENTIAL</strong></dt>
|
||
|
|
||
|
<dd>The credentials are not valid.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>GSS_S_FAILURE</strong></dt>
|
||
|
|
||
|
<dd>The routine failed for reasons that are not defined at the GSS level. The
|
||
|
<em>minor_status</em> return parameter contains a mechanism-dependent error
|
||
|
code describing the reason for the failure.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>GSS_S_NO_CRED</strong></dt>
|
||
|
|
||
|
<dd>The <em>cred_handle</em> parameter does not refer to a valid credential or
|
||
|
there are no default credentials available.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Authorities</h3>
|
||
|
|
||
|
<table border width="80%">
|
||
|
<tr>
|
||
|
<th align="left" valign="bottom">Object Referred to</th>
|
||
|
<th align="center" valign="bottom">Data Authority Required</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td align="left" valign="top">Each directory in the path name preceding the
|
||
|
configuration file</td>
|
||
|
<td align="center" valign="top">*X</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">Configuration file</td>
|
||
|
<td align="center" valign="top">*R</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">Each directory in the path name preceding the
|
||
|
credential cache file</td>
|
||
|
<td align="center" valign="top">*X</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">Credential cache file</td>
|
||
|
<td align="center" valign="top">*RW</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Error Messages</h3>
|
||
|
|
||
|
<table width="100%" cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<th align="left" valign="top">Message ID</th>
|
||
|
<th align="left" valign="top">Error Message Text</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td width="15%" valign="top">CPE3418 E</td>
|
||
|
<td width="85%" valign="top">Possible APAR condition or hardware failure.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<hr>
|
||
|
API introduced: V5R1
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
||
|
"sec.htm">Security APIs</a> <br>
|
||
|
<a href="unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by
|
||
|
category</a> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|