---
name: "rpc_gss_seccreate"
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_seccreate/3t"
---

# rpc\_gss\_seccreate(3t)

create a security context using the RPCSEC\_GSS protocol

## NAME

**rpc\_gss\_seccreate** – create a security context using the RPCSEC\_GSS protocol

## SYNOPSIS

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

*AUTH* *\**\

**rpc\_gss\_seccreate**(*CLIENT \*clnt*, *const char \*principal*, *const char  \*mechanism*, *rpc\_gss\_service\_t service*, *const char \*qop*, *rpc\_gss\_options\_req\_t \*options\_req*, *rpc\_gss\_options\_ret\_t \*options\_ret*);

## DESCRIPTION

This function is used to establish a security context between an application and a remote peer using the RPSEC\_GSS protocol.

## PARAMETERS

- clnt

  An RPC handle which is connected to the remote peer

- principal

  The name of the service principal on the remote peer. For instance, a principal such as "nfs@server.example.com" might be used by an application which needs to contact an NFS server

- mechanism

  The name of the GSS\_API mechanism to use for the new security context. "kerberos\_v5" is currently the only supported mechanism.

- service

  Type of service requested.

  - rpc\_gss\_svc\_default

    The default - typically the same as rpc\_gss\_svc\_none.

  - rpc\_gss\_svc\_none

    RPC headers only are integrity protected by a checksum.

  - rpc\_gss\_svc\_integrity

    RPC headers and data are integrity protected by a checksum.

  - rpc\_gss\_svc\_privacy

    RPC headers are integrity protected by a checksum and data is encrypted.

- qop

  The name of the Quality of Protection to use for the new security context, or NULL to use the default QOP. "GSS\_C\_QOP\_DEFAULT" is currently the only supported QOP.

- options\_req

  Extra security context options to be passed to the underlying GSS-API mechanism. Pass NULL to supply default values.

- options\_ret

  Various values returned by the underlying GSS-API mechanism. Pass NULL if these values are not required.

## RETURN VALUES

If the security context was created successfully, a pointer to an *AUTH* structure that represents the context is returned. To use this security context for subsequent RPC calls, set *clnt-\>cl\_auth* to this value.

## AVAILABILITY

The **rpc\_gss\_seccreate**() function is part of libtirpc.

## SEE ALSO

[rpc(3)](/rpc/3.md), [gssapi(3)](/gssapi/3.md), [mech(5)](/mech/5.md), [qop(5)](/qop/5.md), [rpcsec\_gss(3)](/rpcsec_gss/3.md)

## AUTHORS

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