<!--
{
  "documentType" : "article",
  "framework" : "GSS",
  "identifier" : "/documentation/GSS/name-handling",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Name Handling"
}
-->

# Name Handling

Manage names for GSS-API principals such as a person, a machine, or an application.

## Topics

### Name Types

[`GSS_C_NO_NAME`](/documentation/GSS/GSS_C_NO_NAME)

An empty name object.

[`GSS_C_NT_USER_NAME`](/documentation/GSS/GSS_C_NT_USER_NAME)

A name that specifies a user on a local system in the username format.

[`GSS_C_NT_MACHINE_UID_NAME`](/documentation/GSS/GSS_C_NT_MACHINE_UID_NAME)

A name used to specify a user on the local system by way of a numeric identifier.

[`GSS_C_NT_STRING_UID_NAME`](/documentation/GSS/GSS_C_NT_STRING_UID_NAME)

A name that specifies a user on the local system by way of a string representation of a numeric identifier.

[`GSS_C_NT_HOSTBASED_SERVICE_X`](/documentation/GSS/GSS_C_NT_HOSTBASED_SERVICE_X)

A service that is related to a particular host.

[`GSS_C_NT_HOSTBASED_SERVICE`](/documentation/GSS/GSS_C_NT_HOSTBASED_SERVICE)

A name used to specify services provided by host computers in the service/hostname format.

[`GSS_C_NT_ANONYMOUS`](/documentation/GSS/GSS_C_NT_ANONYMOUS)

A name that refers to an anonymous principal.

[`GSS_C_NT_EXPORT_NAME`](/documentation/GSS/GSS_C_NT_EXPORT_NAME)

A name of the type exported by the export name function.

[`GSS_KRB5_NT_PRINCIPAL_NAME`](/documentation/GSS/GSS_KRB5_NT_PRINCIPAL_NAME)

A name composed as a single-string representation of a Kerberos name.

[`GSS_KRB5_NT_PRINCIPAL`](/documentation/GSS/GSS_KRB5_NT_PRINCIPAL)

A name composed as a single-string representation of a Kerberos name.

### Creation and Destruction

[`gss_name_t`](/documentation/GSS/gss_name_t)

A pointer to an opaque type that you use to communicate name objects with GSS-API functions.

[`gss_const_name_t`](/documentation/GSS/gss_const_name_t)

A pointer to an immutable version of the opaque descriptor used to exchange name objects with GSS-API functions.

[`gss_canonicalize_name`](/documentation/GSS/gss_canonicalize_name(_:_:_:_:))

Converts an internal name into a mechanism name.

[`GSSNameCreateDisplayString`](/documentation/GSS/GSSNameCreateDisplayString(_:))

Returns a string suitable for displaying to the user from a GSS name.

[`GSSCreateName`](/documentation/GSS/GSSCreateName(_:_:_:))

Returns a GSS name given a buffer and a type.

[`gss_release_name`](/documentation/GSS/gss_release_name(_:_:))

Frees the resources associated with a name object.

### Inquiries

Create, compare, and examine names, the objects used to identify entities.

[`gss_display_name`](/documentation/GSS/gss_display_name(_:_:_:_:))

Converts a name in the internal format to an octet string and the associated name type.

[`gss_compare_name`](/documentation/GSS/gss_compare_name(_:_:_:_:))

Returns a flag that indicates if two names in internal name format refer to the same entity.

[`gss_inquire_name`](/documentation/GSS/gss_inquire_name(_:_:_:_:_:))

Returns information about a name.

[`gss_inquire_mechs_for_name`](/documentation/GSS/gss_inquire_mechs_for_name(_:_:_:))

Returns a list of mechanisms that support a particular name type.

[`gss_inquire_names_for_mech`](/documentation/GSS/gss_inquire_names_for_mech(_:_:_:))

Returns a list of name types that a given mechanism supports.

[`gss_duplicate_name`](/documentation/GSS/gss_duplicate_name(_:_:_:))

Returns a copy of an internal name.

[`gss_aapl_change_password`](/documentation/GSS/gss_aapl_change_password(_:_:_:_:))

Changes the password associated with a name.

[`gss_userok`](/documentation/GSS/gss_userok(_:_:))

Returns a flag that indicates if a given user is authorized.

### Imports and Exports

[`gss_export_name`](/documentation/GSS/gss_export_name(_:_:_:))

Returns a mechanism name in contiguous octet format.

[`gss_import_name`](/documentation/GSS/gss_import_name(_:_:_:_:))

Converts a name in contiguous octet format to the internal name format.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)