185 lines
4.8 KiB
HTML
185 lines
4.8 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>krb5_cc_initialize()--Initialize Credentials Cache</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: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!-- Created by Kent Hofer for V5R1 -->
|
|
<!-- Edited by Kersten Jan 02 -->
|
|
<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>krb5_cc_initialize()--Initialize Credentials Cache</h2>
|
|
|
|
<div class="box" style="width: 60%;">
|
|
<br>
|
|
Syntax
|
|
|
|
<pre>
|
|
#include <krb5.h>
|
|
|
|
krb5_error_code krb5_cc_initialize(
|
|
krb5_context <em>context</em>,
|
|
krb5_ccache <em>ccache</em>,
|
|
krb5_principal <em>principal</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>krb5_cc_initialize()</strong> function initializes a credentials
|
|
cache. Any existing credentials are discarded and the principal name for the
|
|
cache is set to the value specified. The principal name is the default client
|
|
name for tickets that will be placed in the cache. A new cache must be
|
|
initialized before tickets can be stored in the cache.</p>
|
|
|
|
<br>
|
|
<h3>Authorities</h3>
|
|
|
|
<p>When the credentials cache is of type "FILE" (see
|
|
<strong>krb5_cc_resolve()</strong> for more information on cache types), the
|
|
default behavior is that the credentials cache file is created in the
|
|
/QIBM/UserData/OS400/NetworkAuthentication/creds directory. The placement of
|
|
the credentials cache file can be changed by setting the KRB5CCNAME environment
|
|
variable.</p>
|
|
|
|
<p>If the credentials cache file does not reside in the default directory, the
|
|
following authorities are required:</p>
|
|
|
|
<table border cellpadding="5">
|
|
<!-- width="80" -->
|
|
<!-- cols="30 70" -->
|
|
<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
|
|
parent directory</td>
|
|
<td align="center" valign="top">*X</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">Parent directory if cache file is being
|
|
created</td>
|
|
<td align="center" valign="top">*WX</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">Cache file, if being reused</td>
|
|
<td align="center" valign="top">*RW</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>If the credentials cache file resides in the default directory, the
|
|
following authorities are required:</p>
|
|
|
|
<table border cellpadding="5">
|
|
<tr>
|
|
<th align="left" valign="bottom">Object Referred to</th>
|
|
<th align="left" valign="bottom">Data Authority Required</th>
|
|
<th align="left" valign="bottom">Object Authority Required</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">All directories in the path name</td>
|
|
<td align="center" valign="top">*X</td>
|
|
<td align="center" valign="top">None</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">Credentials cache file</td>
|
|
<td align="center" valign="top">*RW</td>
|
|
<td align="center" valign="top">None</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<br>
|
|
<h3>Parameters</h3>
|
|
|
|
<dl>
|
|
<dt><strong>context</strong> (Input)</dt>
|
|
|
|
<dd>The Kerberos context.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>ccache</strong> (Input)</dt>
|
|
|
|
<dd>The credentials cache handle.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>principal</strong> (Input)</dt>
|
|
|
|
<dd>The default principal for the cache.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Return Value</h3>
|
|
|
|
<p>If no errors occur, the return value is 0. Otherwise, a Kerberos error code
|
|
is returned.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Error Messages</h3>
|
|
|
|
<table width="100%" cellpadding="5">
|
|
<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>
|
|
|