# rpc_gss_set_svc_name(3) - man - phpman

[RPC_GSS_SET_SVC_NAME(3)](https://www.chedong.com/phpMan.php/man/RPCGSSSETSVCNAME/3/markdown)  BSD Library Functions Manual  [RPC_GSS_SET_SVC_NAME(3)](https://www.chedong.com/phpMan.php/man/RPCGSSSETSVCNAME/3/markdown)

## 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 secu‐
     rity 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)](https://www.chedong.com/phpMan.php/man/gssacquirecred/3/markdown) 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)](https://www.chedong.com/phpMan.php/man/rpc/3/markdown), [gssapi(3)](https://www.chedong.com/phpMan.php/man/gssapi/3/markdown), [gss_acquire_cred(3)](https://www.chedong.com/phpMan.php/man/gssacquirecred/3/markdown), [rpcsec_gss(3)](https://www.chedong.com/phpMan.php/man/rpcsecgss/3/markdown)

## AUTHORS
     This manual page was written by Doug Rabson <<dfr@FreeBSD.org>>.

BSD                            January 26, 2010                            BSD
