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

# rpc\_gss\_seccreate(3)

create a security context using the RPCSEC\_GSS protocol

## NAME

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

## LIBRARY

library “librpcsec\_gss”

## 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 desired mechanism for this security context. The value of mechanism should be the name of one of the security mechanisms listed in /etc/gss/mech.

- 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

  Desired quality of protection or NULL for the default. Available values are listed in /etc/gss/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.

## SEE ALSO

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

## HISTORY

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

## AUTHORS

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