Changeset View
Changeset View
Standalone View
Standalone View
sys/kgssapi/gss_release_cred.c
Show All 25 Lines | |||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/jail.h> | |||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/kobj.h> | #include <sys/kobj.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <kgssapi/gssapi.h> | #include <kgssapi/gssapi.h> | ||||
#include <kgssapi/gssapi_impl.h> | #include <kgssapi/gssapi_impl.h> | ||||
#include "gssd.h" | #include "gssd.h" | ||||
OM_uint32 | OM_uint32 | ||||
gss_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle) | gss_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle) | ||||
{ | { | ||||
struct release_cred_res res; | struct release_cred_res res; | ||||
struct release_cred_args args; | struct release_cred_args args; | ||||
enum clnt_stat stat; | enum clnt_stat stat; | ||||
CLIENT *cl; | CLIENT *cl; | ||||
*minor_status = 0; | *minor_status = 0; | ||||
if (!kgss_gssd_handle) | KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); | ||||
if (!KGSS_VNET(kgss_gssd_handle)) { | |||||
KGSS_CURVNET_RESTORE(); | |||||
return (GSS_S_FAILURE); | return (GSS_S_FAILURE); | ||||
} | |||||
KGSS_CURVNET_RESTORE(); | |||||
if (*cred_handle) { | if (*cred_handle) { | ||||
args.cred = (*cred_handle)->handle; | args.cred = (*cred_handle)->handle; | ||||
cl = kgss_gssd_client(); | cl = kgss_gssd_client(); | ||||
if (cl == NULL) | if (cl == NULL) | ||||
return (GSS_S_FAILURE); | return (GSS_S_FAILURE); | ||||
stat = gssd_release_cred_1(&args, &res, cl); | stat = gssd_release_cred_1(&args, &res, cl); | ||||
Show All 15 Lines |