---
name: "rpc_gss_getcred"
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_getcred"
---

# rpc\_gss\_getcred(3)

Get authorization information for an RPC request

## NAME

**rpc\_gss\_getcred** – Get authorization information for an RPC request

## LIBRARY

library “librpcsec\_gss”

## SYNOPSIS

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

*AUTH* *\**\

**rpc\_gss\_getcred**(*struct svc\_req \*req*, *rpc\_gss\_rawcred\_t \*\*rcred*, *rpc\_gss\_ucred\_t \*\*ucred*, *void \*\*cookie*);

## DESCRIPTION

This function returns the RPCSEC\_GSS authenticated credentials associated with an RPC request.

## PARAMETERS

- req

  The RPC request to query

- rcred

  If non-null, *\*rcred* is set to point at the raw credentials for this request

- ucred

  - rcred

  If non-null, *\*ucred* is set to point at the corresponding unix credentials

- cookie

  If non-null, *\*cookie* is set to the cookie value returned by a callback function registered with **rpc\_gss\_set\_callback**()

## RETURN VALUES

Returns TRUE if successful, FALSE otherwise.

## SEE ALSO

[gssapi(3)](/gssapi/3.md), [rpc(3)](/rpc/3.md), [rpc\_gss\_set\_callback(3)](/rpc_gss_set_callback/3.md), [rpcsec\_gss(3)](/rpcsec_gss/3.md)

## HISTORY

The **rpc\_gss\_getcred** function first appeared in FreeBSD 8.0.

## AUTHORS

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