The intent of ther Kerberos Realms Configuration library is to provide a single API for managing realms configuration for both Kerberos v4 and Kerberos v5. Having this API will simplify Kerberos administration clients, because they will not have to separately talk to Kerberos v4 and Kerberos v5 implementations. Using the API will also contribute to a more uniform user experience in mixed Kerberos environments.
KRContext is an opaque reference to a library context. Each library call, except for KRInitialize and KRTerminate, must have a valid KRContext as the first parameter. A KRContext is initialized by KRInitialize, and is only valid after KRInitialize has been called on it and has returned krNoErr. A KRContext is no longer valid after KRTerminate has been called on it.
KRRealm is an opaque reference to data for a single realm. A KRRealm is valid after being returned by a library call (such as KRRealmIteratorNext). A KRRealm is invalidated when the corresponding realm is removed, or when the context within which is was created is terminated.
Realms names are unique.
KRDomain is an opaque reference to data for a single domain mapping for a realm. A KRDomain is valid after being returned by a library call (such as KRRealmDomainIteratorNext). A KRDomain is invalidated when the corresponding realm is removed, when the corresponding domain is removed, or when the context within which is was created is terminated.
Domain names are globally unique, i.e. two realms cannot contain domain with the same names.
KRServer is an opaque reference to data for a single server for a realm. A KRServer is valid after being returned by a library call (such as KRRealmServerIteratorNext). A KRServer is invalidated when the corresponding realm is removed, when the corresponding server is removed, or when the context within which is was created is terminated.
Server names are unique per realm, i.e. two realms can share a server name.
KRIterator is an opaque reference to an iterator. Iterators can be used to sequentially retrieve realms, domains, or servers. A KRIterator is valid after being initialized by a KR*IteratorBegin library call. A KRiterator is invalidated with a corresponding call to KR*IteratorEnd.
KRName is a structure used to return generic string data. It has two fields: data, which is a pointer to name data, and length, which contains length of the data field. The data field is not terminated with a NUL character.
If a KRName is returned by a library call (such as KRGetRealmName), it must be freed with KRFreeName().
KRStatus is a type used to return error codes from all library calls.
KRPermissions is used to indicate whether a context will access configuration data for reading, writing, or both. It is an enumerated type with the following domain:
|
permission_Read |
1 |
Read access |
|
permission_Write |
2 |
Write access |
|
permission_ReadWrite |
3 |
Read and write access |
KRRealmFlags is a 32 bit bitfield. The following flags are defined:
|
realmFlag_KerberosV4 |
0x00000001 |
This flag is set if the realm is used for Kerberos v4 |
|
realmFlag_KerberosV5 |
0x00000002 |
This flag is set of the realm is used for Kerberos v5 |
|
realmFlag_PasswordHashKnown |
0x00000004 |
This flag is set if the realm is used for Kerberos v4 and is password->key hash function is known |
|
realmFlag_PasswordHashAFS |
0x00000008 |
This flag is sef it the realm is used for Kerberos v4, its password->key hash function is known and it is the AFS password->key has function |
Other flags are reserved.
It is not valid for both realmFlag_KerberosV4 and realmFlag_KerberosV5 to be off.
If realmFlag_KerberosV4 is off, realmFlag_PasswordHashKnown and realmFlag_PasswordHashAFS are ignored.
KRServerFlags is a 32 bit bitfield. The following flags are defined:
|
serverFlag_KerberosV4 |
0x00000001 |
This flag is set if the server is used for Kerberos v4 |
|
serverFlag_KerberosV5 |
0x00000002 |
This flag is set if the server is used for Kerberos v5 |
|
serverFlag_KerberosV4Admin |
0x00000004 |
This flag is set if the server is an administrative server for Kerberos v4 |
|
serverFlag_KerberosV5Admin |
0x00000008 |
This flag is set if the server is an administrative server for Kerberos v5 |
Other flags are reserved.
If serverFlag_KerberosV4 is off, it is not valid for serverFlag_KerberosV4Admin to be on.
If serverFlag_KerberosV5 is off, it is not valid for serverFlag_KerberosV5Admin to be on.
If the realm of the server doesn't have the realmFlag_KerberosV4 flag, it is not valid for serverFlag_KerberosV4 to be on.
If the realm of the server doesn't have the realmFlag_KerberosV5 flag, it is not valid for serverFlag_KerberosV5 to be on.
It is not valid for both serverFlag_KerberosV5 and serverFlag_KerberosV4 to be off.
When setting flags of an object with KRSet*Flags() and KRClear*Flags functions, you specify which flags to set or clear. Other flags are unchanged.
For example, to set serverFlag_KerberosV4 and serverFlag_KerberosV4Admin, you would use:
err = KRSetServerFlags (myContext, aServer,
serverFlag_KerberosV4 | serverFlag_KerberosV4Admin);
and to clear serverFlag_KerberosV5Admin and serverFlag_KerberosV4Admin flags, you would use:
err = KRClearServerFlags (myContext, aServer,
serverFlag_KerberosV5Admin | serverFlag_KerberosV4Admin);
This allows the API to later introduce additional flags without breaking old code.
|
krNoErr |
noErr |
no error |
|
krMemFullError |
12477 |
not enough memory |
|
krParamErr |
12478 |
one of parameters was invalid (e.g. NULL pointer) |
|
krBadContextErr |
12479 |
the specified context is infalid |
|
krBadRealmErr |
12480 |
the specified realm is invalid |
|
krBadDomainErr |
12481 |
the specific domain is invalid for the specified realm |
|
krBadServerErr |
12482 |
the specified server is invalid for the specified realm |
|
krBadRealmFlagsErr |
12483 |
the specified realm flags are invalid |
|
krBadIteratorErr |
12484 |
the specified iterator is invalid |
|
krBadName |
12485 |
the specified name is invalid |
|
krBadPermissions |
12486 |
the specified permissions are invalid |
|
krRealmExists |
12487 |
realm with specified name already exists |
|
krDomainExists |
12488 |
domain with specified name already exists |
|
krServerExists |
12489 |
server with specified name already exists for the specified realm |
|
krRealmDoesntExist |
12490 |
no realm with specified properties exists |
|
krDomainDoesntExist |
12491 |
no domain with specified properties exists |
|
krServerDoesntExist |
12492 |
no server with specified properties exists |
|
krIteratorEnd |
12493 |
iterator has reached the end of its iteration set |
|
krPermissionErr |
12494 |
permissions error trying to use a read function without a read lock, or trying to use a write function without a write lock, or trying to release a lock not previously acquired. |
The following special values should be used to initialize opaque references. KRFree*() functions set opaque references to these values, so you can compare against them to check whether a properly initialized reference should be freed or not.
|
kKRNoRealm |
0 |
for KRRealm |
|
kKRNoDomain |
0 |
for KRDomain |
|
kKRNoServer |
0 |
for KRServer |
|
kKRNoName |
{0, 0} |
for KRName |
The only structure that you should not free with KRFree*() even if it is not equal to a value in the above table is a KRName that you initialized with a buffer that you allocated.
KRStatus KRInitialize (
KRContext* outContext);
Returns: krNoErr, krMemFullErr, krParamErr
Open a connection to the library.
On entry, outContext points to storage for a KRContext.
If return value is krNoErr, outContext has been initialized, but has not acquired any locks. Otherwise, return value is one of the allowed return values and outContext is unchanged.
KRStatus KRTerminate (
KRContext* ioContext);
Returns: krNoerr, krBadContextErr, krParamErr
Close a connection to the library and write out changes to the configuration (if any).
On entry, ioContext is a valid KRContext initialized by KRInitialize().
If return value is krNoErr, any changes made to the configuration with ioContext are written out, storage associated with ioContext is disposed, all locks associated with ioContexts are released, and ioContext is no longer valid. Otherwise, return value is one of allowed return codes, ioContext is unmodified, and no changes to the configuration are committed.
Each type of iterator has three functions: KR*IteratorBegin(), KR*IteratorNext(), and KR*IteratorEnd(). A KRIterator is not valid until KR*IteratorBegin() has been called to initialize it, and is no longer valid after the corresponding KR*IteratorEnd() has been called on it. KR*IteratorNext() will fail if it is called on an invalid iterator, or iterator of the wrong type (for example, KRRealmIteratorNext will fail if called with iterator initialized by KRRealmServerIteratorBegin()).
Iteratos will operate correctly even if realms configuration is changed while an iterator is active. In such cases, iterators will always return all object present both at the time KR*IteratorBegin was called and at the time KR*IteratorEnd was called, and will not return any object that was not present at the time KR*IteratorBegin was called nor at the time KR*IteratorEnd was called.
KRStatus KRRealmIteratorBegin (
KRContext inContext,
KRIterator* outIterator);
Returns: krNoErr, krMemFullErr, krBadContextErr, krParamErr
Initialize a realm iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), and outIterator points to storage for a KRIterator.
If return value if krNoErr, no error occured, and outIterator is initialized to a new realm iterator. Otherwise, return value is one of the allowed return values, and outIterator is unchanged.
KRStatus KRRealmIteratorNext (
KRContext inContext,
KRIterator inIterator,
KRRealm* outRealm);
Returns: krNoErr, krPermissionErr, krMemFullErr, krBadContextErr, krBadIteratorErr, krParamErr, krIteratorEnd
Advance a realm iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), inIterator is a KRIterator initialized with KRRealmIteratorBegin(), and outRealm points to storage for a KRRealm.
If return value is krNoErr, no error occured, and outRealm is initialized to the next realm. Otherwise, return value is one of the allowed return values, and outRealm is unchanged.
If return value is krNoErr, you must free outRealm with KRFreeRealm.
KRStatus KRRealmIteratorEnd (
KRContext inContext,
KRIterator* ioIterator);
Returns: krNoErr, krBadContextErr, krBadIteratorErr, krParamErr
Close a realm iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), and ioIterator points to a KRIterator initialized with KRRealmIteratorBegin().
If return value is krNoErr, no error occured, and ioIterator is not valid after return. Otherwise, return value is one of allowed return codes, and ioIterator is unchanged.
KRStatus KRRealmDomainIteratorBegin (
KRContext inContext,
KRRealm inRealm,
KRIterator* outIterator);
Returns: krNoErr, krMemFullErr, krBadContextErr, krBadRealmErr, krParamErr
Initialize a domain iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), inRealm is a valid KRRealm, and outIterator points to storage for a KRIterator.
If return value if krNoErr, no error occured, and outIterator is initialized to a new domain iterator for inRealm. Otherwise, return value is one of the allowed return values, and outIterator is unchanged.
KRStatus KRRealmDomainIteratorNext (
KRContext inContext,
KRIterator inIterator,
KRDomain* outDomain);
Returns: krNoErr, krMemFullErr, krBadContextErr, krBadIteratorErr, krParamErr , krIteratorEnd
Advance a domain iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), inIterator is a KRIterator initialized with KRDomainIteratorBegin(), and outDomain points to storage for a KRDomain.
If return value is krNoErr, no error occured, and outDomain is initialized to the next domain. Otherwise, return value is one of the allowed return values, and outDomain is unchanged.
If return value is krNoErr, you must free outDomain with KRFreeDomain().
KRStatus KRRealmDomainIteratorEnd (
KRContext inContext,
KRIterator* ioIterator);
Returns: krNoErr, krBadContextErr, krBadIteratorErr, krParamErr
Close a domain iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), and ioIterator points to a KRIterator initialized with KRDomainIteratorBegin().
If return value is krNoErr, no error occured, and ioIterator is not valid after return. Otherwise, return value is one of allowed return codes, and ioIterator is unchanged.
KRStatus KRRealmServerIteratorBegin (
KRContext inContext,
KRRealm inRealm,
KRIterator*, outIterator);
Returns: krNoErr, krMemFullErr, krBadContextErr, krBadRealmErr, krParamErr
Initialize a server iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), inRealm is a valid KRRealm, and outIterator points to storage for a KRIterator.
If return value if krNoErr, no error occured, and outIterator is initialized to a new server iterator for inRealm. Otherwise, return value is one of the allowed return values, and outIterator is unchanged.
KRStatus KRRealmServerIteratorNext (
KRContext inContext,
KRIterator inIterator,
KRServer* outServer);
Returns: krNoErr, krMemFullErr, krBadContextErr, krBadIteratorErr, krParamErr, krIteratorEnd
Advance a server iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), inIterator is a KRIterator initialized with KRServerIteratorBegin(), and outServer points to storage for a KRServer.
If return value is krNoErr, no error occured, and outServer is initialized to the next server. Otherwise, return value is one of the allowed return values, and outServer is unchanged.
If return value is krNoErr, you must free outServer with KRFreeServer().
KRStatus KRRealmServerIteratorEnd (
KRContext inContext,
KRIterator* ioIterator);
Returns: krNoErr, krBadContextErr, krBadIteratorErr, krParamErr
Close a server iterator.
On entry, inContext is a KRContext initialized with KRInitialize(), and ioIterator points to a KRIterator initialized with KRDomainIteratorBegin().
If return value is krNoErr, no error occured, and ioIterator is not valid after return. Otherwise, return value is one of allowed return codes, and ioIterator is unchanged.
KRStatus KRGetRealmName ( KRContext inContext, KRRealm
inRealm, KRName* outName);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadRealmErr, krParamErr
Retrieve the name of a realm.
On entry, inContext is a KRContext initialized with KRInitialize, inRealm is a valid KRRealm, and outName points to storage for a KRName.
If return value is krNoErr, no error occured, and outName is initialized to the name of inRealm. Otherwise, return value is one of allowed return codes, and outName is unchanged.
If return value is krNoErr, outName must be freed with KRFreeName.
KRStatus KRSetRealmName (
KRContext inContext,
KRRealm inRealm,
KRName inName);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadRealmErr, krParamErr, krRealmExistsErr
Set the name of a realm.
On entry, inContext is a KRContext initialized with KRInitialize, inRealm is a valid KRRealm, and inName is a KRName who data and length fields you initialized.
If return value is krNoErr, no error occured, and name of inRealm is set to inName. Otherwise, return value is one of allowed return codes, and inRealm is unchanged.
You must not free inName with KRFreeName.
KRStatus KRGetRealmFlags (
KRContext inContext,
KRRealm inRealm,
KRRealmFlags* outFlags);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadRealmErr, krParamErr
Retrieve realm flags.
On entry, inContext is a KRContext initialized with KRInitialize, inRealm is a valid KRRealm, and outFlags points to storage for KRRealmFlags.
If return value is krNoErr, no error occured, and outFlags is initialized to the flags of inRealm. Otherwise, return value is one of allowed return codes, and outFlags is unchanged.
See also Note on using flags.
KRStatus KRSetRealmFlags (
KRContext inContext,
KRRealm inRealm,
KRRealmFlags inFlags);
KRStatus KRClearRealmFlags (
KRContext inContext,
KRRealm inRealm,
KRRealmFlags inFlags);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadRealmErr, krBadFlagsErr, krParamErr
Set realm flags.
On entry, inContext is a KRContext initialized with KRInitialize, inRealm is a valid KRRealm, and inFlags contains KRRealmFlags you initialized.
If return value is krNoErr, no error occured, and flags of inRealm are set or cleared according to inFlags. Otherwise, return value is one of allowed return codes, and inRealm is unchanged.
See also Note on using flags.
KRStatus KRAddRealm (
KRContext inContext,
KRName inName,
KRRealmFlags inFlags,
KRRealm* outRealm);
Returns: krNoErr, krPermissionErr, krBadContextErr, krParamErr, krBadFlagsErr, krRealmExistsErr
Create a new realm.
On entrry, inContext is a KRContext initialized with KRInitialize, inName is a KRName whose fields you initialize, inFlags contains valid KRRealmFlags you initialized, and outRealm points to storage for a KRRealm.
If return value is noErr, a new realm is created with the specified name and flags, and a reference to it is returned in outRealms. Otherwise, return value is one of allowed return codes, no new realm is created, and outRealm is unchanged.
You must not free inName with KRFreeName.
KRStatus KRRemoveRealm (
KRContext inContext,
KRRealm inRealm);
Returns: krNoErr, krPermissionErr, krBadContextErr, krBadRealmErr
Remove a realm.
On entry, inContext is a KRContext initialized with KRInitialize, and inRealm is a valid KRRealm.
If return value is noErr, realm corresponding to inRealm is removed, and inRealm is no longer a valid KRRealm. Otherwise, return value is one of allowed return codes, no realm is removed, and inRealm is still a valid reference.
KRStatus KRGetDomainName (
KRContext inContext,
KRDomain inDomain,
KRName* outName);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadDomainErr, krParamErr
Retrieve the name of a domain.
On entry, inContext is a KRContext initialized with KRInitialize, inDomain is a valid KRDomain, and outName points to storage for a KRName.
If return value is krNoErr, no error occured, and outName is initialized to the name of inDomain. Otherwise, return value is one of allowed return codes, and outName is unchanged.
If return value is krNoErr, outName must be freed with KRFreeName.
KRStatus KRSetDomainName (
KRContext inContext,
KRDomain inDomain,
KRName inName);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadDomainErr, krParamErr, krDomainExistsErr
Set the name of a domain.
On entry, inContext is a KRContext initialized with KRInitialize, inDomain is a valid KRDomain, and inName is a KRName who data and length fields you initialized.
If return value is krNoErr, no error occured, and name of inDomain is set to inName. Otherwise, return value is one of allowed return codes, and inDomain is unchanged.
You must not free inName with KRFreeName.
KRStatus KRAddDomain (
KRContext inContext,
KRRealm inRealm,
KRName inName,
KRDomain* outDomain);
Returns: krNoErr, krPermissionErr, krBadContextErr, krParamErr, krBadRealmErr, krDomainExistsErr
Create a new domain in a realm.
On entry, inContext is a KRContext initialized with KRInitialize, inRealm is a valid KRRealm, and inName is a KRName whose fields you initialized.
If return value is noErr, a new domain is created in inRealm is created with the specified name and flags, and a reference to it is returned in outDomain. Otherwise, return value is one of allowed return codes, no new domain is created, and inRealm and outDomain are unchanged.
You must not free inName with KRFreeName.
KRStatus KRRemoveDomain (
KRContext inContext,
KRRealm inRealm,
KRDomain inDomain);
Returns: krNoErr, krPermissionErr, krBadContextErr, krBadRealmErr, krBadDomainErr
Remove a domain from a realm.
On entry, inContext is a KRContext initialized with KRInitialize, inRealm is a valid KRRealm, and inDomain is a valid KRDomain.
If return value is noErr, domain corresponding to inDomain is removed from inRealm, and inDomain is no longer a valid KRDomain. Otherwise, return value is one of allowed return codes, no domain is removed, and inDomain is unmodified.
KRStatus KRGetServerName (
KRContext inContext,
KRServer inServer,
KRName* outName);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadServerErr, krParamErr
Retrieve the name of a server.
On entry, inContext is a KRContext initialized with KRInitialize, inServer is a valid KRServer, and outName points to storage for a KRName.
If return value is krNoErr, no error occured, and outName is initialized to the name of inServer. Otherwise, return value is one of allowed return codes, and outName is unchanged.
If return value is krNoErr, outName must be freed with KRFreeName.
KRStatus KRSetServerName (
KRContext inContext,
KRServer inServer,
KRName inName);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadServerErr, krParamErr, krServerExistsErr
Set the name of a server.
On entry, inContext is a KRContext initialized with KRInitialize, inDomain is a valid KRDomain, and inName is a KRName whose data and length fields you initialized.
If return value is krNoErr, no error occured, and name of inServer is set to inName. Otherwise, return value is one of allowed return codes, and inServer is unchanged.
You must not free inName with KRFreeName.
KRStatus KRGetServerFlags (
KRContext inContext,
KRServer inServer,
KRServerFlags* outFlags);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadServerErr, krParamErr
Retrieve the flags of a server.
On entry, inContext is a KRContext initialized with KRInitialize, inServer is a valid KRServer, and outFlags points to storage for KRServerFlags.
If return value is krNoErr, no error occured, and outFlags is initialized to the flags of inServer. Otherwise, return value is one of allowed return codes, and outFlags is unchanged.
See also Notes on using flags.
KRStatus KRSetServerFlags (
KRContext inContext,
KRServer inServer,
KRServerFlags inFlags);
KRStatus KRClearServerFlags (
KRContext inContext,
KRServer inServer,
KRServerFlags inFlags);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadServerErr, krBadServerFlagsErr
Set the flags of a server.
On entry, inContext is a KRContext initialized with KRInitialize, inServer is a valid KRServer, and inFlags contains KRServerFlags you initialized.
If return value is krNoErr, no error occured, and flags of inServer are set or cleared according to inFlags. Otherwise, return value is one of allowed return codes, and inServer is unchanged.
See also Notes on using flags.
KRStatus KRGetServerPort (
KRContext inContext,
KRServer inServer,
KRServerPort* outPort);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadServerErr, krParamErr
Retrieve the port of a server.
On entry, inContext is a KRContext initialized with KRInitialize, inServer is a valid KRServer, and outPort points to storage for KRServerPort.
If return value is krNoErr, no error occured, and outPort is initialized to the port of inServer. Otherwise, return value is one of allowed return codes, and outPort is unchanged.
KRStatus KRSetServerPort (
KRContext inContext,
KRServer inServer,
KRServerPort inPort);
Returns: krNoerr, krPermissionErr, krBadContextErr, krBadServerErr
Set the port of a server.
On entry, inContext is a KRContext initialized with KRInitialize, inServer is a valid KRServer, and inPort contains KRServerPort you initialized.
If return value is krNoErr, no error occured, and port of inServer are set to inPort. Otherwise, return value is one of allowed return codes, and inServer is unchanged.
KRStatus KRAddServer (
KRContext inContext,
KRRealm inRealm,
KRName inName,
KRServerFlags inFlags,
KRServer* outServer);
Returns: krNoErr, krPermissionErr, krBadContextErr, krParamErr, krBadRealmErr, krServerExistsErr
Create a new server in a realm.
On entry, inContext is a KRContext initialized with KRInitialize, inRealm is a valid KRRealm, inName is a KRName whose fields you initialized, and inFlags contains KRServerFlags which you initialized.
If return value is noErr, a new server is created in inRealm with the specified name and flags, and a reference to it is returned in outServer. Otherwise, return value is one of allowed return codes, no new server is created, and inRealm and outServver are unchanged.
You must not free inName with KRFreeName.
KRStatus KRRemoveServer (
KRContext inContext,
KRServer inServer);
Returns: krNoErr, krPermissionErr, krBadContextErr, krBadRealmErr, krBadServerErr
Remove a server from a realm.
On entry, inContext is a KRContext initialized with KRInitialize, inRealm is a valid KRRealm, and inServer is a valid KRServer.
If return value is noErr, domain corresponding to inServer is removed from inRealm, and inServer is no longer a valid KRDomain. Otherwise, return value is one of allowed return codes, no domain is removed, and inServer is unmodified.
KRStatus KRLock (
KRContext inContext,
KRPermissions inPermissions);
Returns: krNoErr, krPermissionErr, krBadContextErr
Acquire a lock on the configuration.
On entry, inContext is a KRContext initialized with KRInitialize, and inPermissions contains valid KRPermissions you initialized.
If return value is noErr, then inContext has or has acquired an appropriate lock on the configuration. Otherwise, return value is one of allowed return codes, no lock is acquired, and inContext is unmodified.
KRStatus KRUnlock (
KRContext inContext,
KRPermissions inPermissions);
Returns: krNoErr, krBadContextErr, krBadPermissionsErr
Release a lock on the configuration.
On entry, inContext is a KRContext initialized with KRInitialize, and inPermissions contains KRPermissions you initialized.
If return value is noErr, then inContext no longer has the lock on the configuration. Otherwise, return value is one of allowed return codes, and inContext is unmodified.
KRStatus KRFreeName (
KRContext inContext,
KRName* ioName);
Returns: krNoErr, krBadContextErr, krBadNameErr
Free storage associated with a KRName.
On entry, inContext is a KRContext initialized with KRInitialize, and ioName is a KRName returned by an API function.
If return value is noErr, storage for ioName data is freed and set to nil; length of ioData is set to zero. Otherwise, return value is one of allowed return codes, and ioName is unmodified.
KRStatus KRFreeRealm (
KRContext inContext,
KRRealm* ioRealm);
Returns: krNoErr, krBadContextErr, krBadRealmErr
Free storage associated with a KRRealm.
On entry, inContext is a KRContext initialized with KRInitialize, and ioRealm is a KRRealm returned by an API function.
If return value is noErr, storage for ioRealm is freed and ioRealm is no longer valid. Otherwise, return value is one of allowed return codes, and ioRealm is unmodified.
KRStatus KRFreeDomain (
KRContext inContext,
KRDomain* ioDomain);
Returns: krNoErr, krBadContextErr, krBadDomainErr
Free storage associated with a KRDomain.
On entry, inContext is a KRContext initialized with KRInitialize, and ioDomain is a KRDomain returned by an API function.
If return value is noErr, storage for ioDomain is freed and ioDomain is no longer valid. Otherwise, return value is one of allowed return codes, and ioRealm is unmodified.
KRStatus KRFreeServer (
KRContext inContext,
KRServer* ioServer);
Returns: krNoErr, krBadContextErr, krBadServerErr
Free storage associated with a KRName.
On entry, inContext is a KRContext initialized with KRInitialize, and ioServer is a KRServer returned by an API function.
If return value is noErr, storage for ioServer is freed and ioServer is no longer valid. Otherwise, return value is one of allowed return codes, and ioRealm is unmodified.