{
    "mode": "man",
    "parameter": "RPC_GSS_SET_CALLBACK",
    "section": "3",
    "url": "https://www.chedong.com/phpMan.php/man/RPC_GSS_SET_CALLBACK/3/json",
    "generated": "2026-06-02T15:18:33Z",
    "synopsis": "#include <rpc/rpcsecgss.h>\nboolt\n(*callback)(struct svcreq *req, gsscredidt deleg, gssctxidt gsscontext,\nrpcgsslockt *lock, void cookie);\nboolt\nrpcgsssetcallback(rpcgsscallbackt *cb);",
    "sections": {
        "NAME": {
            "content": "rpcgsssetcallback — Register a security context creation callback\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "#include <rpc/rpcsecgss.h>\n\nboolt\n(*callback)(struct svcreq *req, gsscredidt deleg, gssctxidt gsscontext,\nrpcgsslockt *lock, void cookie);\n\nboolt\nrpcgsssetcallback(rpcgsscallbackt *cb);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Register a function which will be called when new security contexts are created on a server.\nThis function will be called on the first RPC request which uses that context and has the op‐\nportunity of rejecting the request (for instance after matching the request credentials to an\naccess control list).  To accept the new security context, the callback should return TRUE,\notherwise FALSE.  If the callback accepts a context, it becomes responsible for the lifetime of\nthe delegated client credentials (if any).\n\nIt is also possible to 'lock' the values of service and quality of protection used by the con‐\ntext.  If a context is locked, any subsequent requests which use different values for service\nand quality of protection will be rejected.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "cb           A structure containing the RPC program and version for this callback and a func‐\ntion which will be called when new contexts are created for the given RPC program\nand version\n\nreq          The RPC request using the new context\n\ndeleg        GSS-API delegated credentials (if any)\n\ngsscontext  The GSS-API context\n\nlock         A structure used to enforce a particular QOP and service. Set lock->locked to TRUE\nto lock the service and QOP values\n\ncookie       The callback function may set *cookie to any pointer sized value.  This value can\nbe accessed during the lifetime of the context via rpcgssgetcred().\n",
            "subsections": []
        },
        "RETURN VALUES": {
            "content": "Returns TRUE if the callback was registered successfully or FALSE otherwise\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "The rpcgsssetcallback() function is part of libtirpc.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "rpc(3), gssapi(3), rpcgssgetcred(3) rpcsecgss(3)\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "This manual page was written by Doug Rabson <dfr@FreeBSD.org>.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "There is no mechanism for informing a server when a security context has been deleted.  This\nmakes it difficult to allocate resources (e.g. to return via the callback's cookie argument).\n\nBSD                            January 26, 2010                            BSD",
            "subsections": []
        }
    },
    "summary": "rpcgsssetcallback — Register a security context creation callback",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "rpc",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/rpc/3/json"
        },
        {
            "name": "gssapi",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/gssapi/3/json"
        },
        {
            "name": "rpcgssgetcred",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/rpcgssgetcred/3/json"
        },
        {
            "name": "rpcsecgss",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/rpcsecgss/3/json"
        }
    ]
}