X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fgss%2Fgss_internal.h;h=65fc5f8289f6c73e74ec248a274badd8f2e9ba9e;hb=2c27b194121665061cc0527e8bef35886ec7fea8;hp=876ea39d7d724c61de730f47dd439b0b96f96090;hpb=0b85782334b5f0c2ef362b35ea672ddc575cbc30;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/gss/gss_internal.h b/lustre/ptlrpc/gss/gss_internal.h index 876ea39..65fc5f8 100644 --- a/lustre/ptlrpc/gss/gss_internal.h +++ b/lustre/ptlrpc/gss/gss_internal.h @@ -3,7 +3,7 @@ * * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2016, Intel Corporation. * * Author: Eric Mei */ @@ -11,6 +11,7 @@ #ifndef __PTLRPC_GSS_GSS_INTERNAL_H_ #define __PTLRPC_GSS_GSS_INTERNAL_H_ +#include #include /* @@ -92,7 +93,11 @@ unsigned long gss_round_ctx_expiry(unsigned long expiry, /* * XXX make it visible of kernel and lgssd/lsvcgssd */ -#define GSSD_INTERFACE_VERSION (1) +enum { + GSSD_INTERFACE_VERSION_V1 = 1, + GSSD_INTERFACE_VERSION_V2 = 2, + GSSD_INTERFACE_VERSION = GSSD_INTERFACE_VERSION_V2, +}; #define PTLRPC_GSS_VERSION (1) @@ -119,16 +124,18 @@ enum ptlrpc_gss_header_flags { static inline __u32 import_to_gss_svc(struct obd_import *imp) { - const char *name = imp->imp_obd->obd_type->typ_name; - - if (!strcmp(name, LUSTRE_MGC_NAME)) - return LUSTRE_GSS_TGT_MGS; - if (!strcmp(name, LUSTRE_MDC_NAME)) - return LUSTRE_GSS_TGT_MDS; - if (!strcmp(name, LUSTRE_OSC_NAME)) - return LUSTRE_GSS_TGT_OSS; - LBUG(); - return 0; + const char *name = imp->imp_obd->obd_type->typ_name; + + if (!strcmp(name, LUSTRE_MGC_NAME)) + return LUSTRE_GSS_TGT_MGS; + if (!strcmp(name, LUSTRE_MDC_NAME) || + !strcmp(name, LUSTRE_LWP_NAME)) + return LUSTRE_GSS_TGT_MDS; + if (!strcmp(name, LUSTRE_OSC_NAME) || + !strcmp(name, LUSTRE_OSP_NAME)) + return LUSTRE_GSS_TGT_OSS; + + return 0; } /* @@ -468,7 +475,7 @@ __u32 g_verify_token_header(rawobj_t *mech, int *body_size, /* gss_cli_upcall.c */ -int gss_do_ctx_init_rpc(char *buffer, unsigned long count); +int gss_do_ctx_init_rpc(char __user *buffer, unsigned long count); int gss_do_ctx_fini_rpc(struct gss_cli_ctx *gctx); int __init gss_init_cli_upcall(void); @@ -513,8 +520,13 @@ int __init init_kerberos_module(void); void cleanup_kerberos_module(void); /* gss_sk_mech.c */ +#ifdef HAVE_OPENSSL_SSK int __init init_sk_module(void); void cleanup_sk_module(void); +#else +static inline int init_sk_module(void) { return 0; } +static inline void cleanup_sk_module(void) { return; } +#endif /* HAVE_OPENSSL_SSK */ /* debug */ static inline