---
name: "rpc_gss_set_svc_name"
section: "3t"
platform: "linux"
package: "libtirpc"
version: "1.3.8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/rpc_gss_set_svc_name/3t"
---

# rpc\_gss\_set\_svc\_name(3t)

Associate a GSS-API service principal with an RPC service

## NAME

**rpc\_gss\_set\_svc\_name** – Associate a GSS-API service principal with an RPC service

## SYNOPSIS

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

*bool\_t*\

**rpc\_gss\_set\_svc\_name**(*const char \*principal*, *const char \*mechanism*, *u\_int req\_time*, *u\_int program*, *u\_int version*);

## DESCRIPTION

This function registers a service principal which will be used to authenticate RPCSEC\_GSS security contexts for a given RPC program and version.

## PARAMETERS

- principal

  A string representing the service principal in the form "service@hostname"

- mechanism

  The name of the security mechanism

- req\_time

  The time in seconds that the service credentials should remain valid. See [gss\_acquire\_cred(3)](/gss_acquire_cred/3.md) for more details. principal.

- program

  RPC program number for this service

- version

  RPC program version for this service

## RETURN VALUES

Returns TRUE if the service principal was registered or FALSE otherwise.

## AVAILABILITY

The **rpc\_gss\_set\_svc\_name**() function is part of libtirpc.

## SEE ALSO

[rpc(3)](/rpc/3.md), [gssapi(3)](/gssapi/3.md), [gss\_acquire\_cred(3)](/gss_acquire_cred/3.md), [rpcsec\_gss(3)](/rpcsec_gss/3.md)

## AUTHORS

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