---
name: "rpc_gss_get_principal_name"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/rpc_gss_get_principal_name"
---

# rpc\_gss\_get\_principal\_name(3)

Get a principal name

## NAME

**rpc\_gss\_get\_principal\_name** – Get a principal name

## LIBRARY

library “librpcsec\_gss”

## SYNOPSIS

**#include \<rpc/rpcsec\_gss.h\>**

*bool\_t*\

**rpc\_gss\_get\_principal\_name**(*rpc\_gss\_principal\_t \*principal*, *const char \*mech*, *const char \*name*, *const char \*node*, *const char \*domain*);

## DESCRIPTION

This function can be used to generate a client principal name from various strings.

## PARAMETERS

- principal

  If the principal is created successfully, *\*principal* will be set to point at the new principal in GSS-API exported name form

- mech

  The name of the mechanism for this principal

- name

  The name part of the principal

- node

  If non-null, the hostname or instance part of the principal

- domain

  If non-null, the domain or realm part of the principal

## RETURN VALUES

Returns TRUE if the principal was created or FALSE otherwise

## SEE ALSO

[gss\_export\_name(3)](/gss_export_name/3.md), [gssapi(3)](/gssapi/3.md), [rpc(3)](/rpc/3.md), [rpcsec\_gss(3)](/rpcsec_gss/3.md)

## HISTORY

The **rpc\_gss\_get\_principal\_name** function first appeared in FreeBSD 8.0.

## AUTHORS

This manual page was written by Doug Rabson ⟨*dfr@FreeBSD.org*⟩.
