static
int sec_install_rctx_kr(struct ptlrpc_sec *sec,
- struct ptlrpc_svc_ctx *svc_ctx)
+ struct ptlrpc_svc_ctx *svc_ctx)
{
- struct ptlrpc_cli_ctx *cli_ctx;
- struct vfs_cred vcred = { 0, 0 };
- int rc;
+ struct ptlrpc_cli_ctx *cli_ctx;
+ struct vfs_cred vcred = { .vc_uid = 0 };
+ int rc;
LASSERT(sec);
LASSERT(svc_ctx);
static
int sec_install_rctx_kr(struct ptlrpc_sec *sec,
- struct ptlrpc_svc_ctx *svc_ctx)
+ struct ptlrpc_svc_ctx *svc_ctx)
{
- struct ptlrpc_cli_ctx *cli_ctx = NULL;
- struct key *key;
- struct vfs_cred vcred = { 0, 0 };
- char desc[64];
- int rc;
+ struct ptlrpc_cli_ctx *cli_ctx = NULL;
+ struct key *key;
+ struct vfs_cred vcred = { .vc_uid = 0 };
+ char desc[64];
+ int rc;
LASSERT(sec);
LASSERT(svc_ctx);
* yet. this need to be fixed in the future.
*/
static struct krb5_enctype enctypes[] = {
- [ENCTYPE_DES_CBC_RAW] = { /* des-cbc-md5 */
- "des-cbc-md5",
- "cbc(des)",
- "md5",
- 0,
- 16,
- 8,
- 0,
- },
- [ENCTYPE_DES3_CBC_RAW] = { /* des3-hmac-sha1 */
- "des3-hmac-sha1",
- "cbc(des3_ede)",
- "hmac(sha1)",
- 0,
- 20,
- 8,
- 1,
- },
- [ENCTYPE_AES128_CTS_HMAC_SHA1_96] = { /* aes128-cts */
- "aes128-cts-hmac-sha1-96",
- "cbc(aes)",
- "hmac(sha1)",
- 0,
- 12,
- 16,
- 1,
- },
- [ENCTYPE_AES256_CTS_HMAC_SHA1_96] = { /* aes256-cts */
- "aes256-cts-hmac-sha1-96",
- "cbc(aes)",
- "hmac(sha1)",
- 0,
- 12,
- 16,
- 1,
- },
- [ENCTYPE_ARCFOUR_HMAC] = { /* arcfour-hmac-md5 */
- "arcfour-hmac-md5",
- "ecb(arc4)",
- "hmac(md5)",
- 0,
- 16,
- 8,
- 1,
- },
+ [ENCTYPE_DES_CBC_RAW] = { /* des-cbc-md5 */
+ .ke_dispname = "des-cbc-md5",
+ .ke_enc_name = "cbc(des)",
+ .ke_hash_name = "md5",
+ .ke_hash_size = 16,
+ .ke_conf_size = 8,
+ },
+ [ENCTYPE_DES3_CBC_RAW] = { /* des3-hmac-sha1 */
+ .ke_dispname = "des3-hmac-sha1",
+ .ke_enc_name = "cbc(des3_ede)",
+ .ke_hash_name = "hmac(sha1)",
+ .ke_hash_size = 20,
+ .ke_conf_size = 8,
+ .ke_hash_hmac = 1,
+ },
+ [ENCTYPE_AES128_CTS_HMAC_SHA1_96] = { /* aes128-cts */
+ .ke_dispname = "aes128-cts-hmac-sha1-96",
+ .ke_enc_name = "cbc(aes)",
+ .ke_hash_name = "hmac(sha1)",
+ .ke_hash_size = 12,
+ .ke_conf_size = 16,
+ .ke_hash_hmac = 1,
+ },
+ [ENCTYPE_AES256_CTS_HMAC_SHA1_96] = { /* aes256-cts */
+ .ke_dispname = "aes256-cts-hmac-sha1-96",
+ .ke_enc_name = "cbc(aes)",
+ .ke_hash_name = "hmac(sha1)",
+ .ke_hash_size = 12,
+ .ke_conf_size = 16,
+ .ke_hash_hmac = 1,
+ },
+ [ENCTYPE_ARCFOUR_HMAC] = { /* arcfour-hmac-md5 */
+ .ke_dispname = "arcfour-hmac-md5",
+ .ke_enc_name = "ecb(arc4)",
+ .ke_hash_name = "hmac(md5)",
+ .ke_hash_size = 16,
+ .ke_conf_size = 8,
+ .ke_hash_hmac = 1,
+ }
};
#define MAX_ENCTYPES sizeof(enctypes)/sizeof(struct krb5_enctype)
},
};
-/*
- * currently we leave module owner NULL
- */
static struct gss_api_mech gss_kerberos_mech = {
- .gm_owner = NULL, /*THIS_MODULE, */
+ /* .gm_owner uses default NULL value for THIS_MODULE */
.gm_name = "krb5",
.gm_oid = (rawobj_t)
{9, "\052\206\110\206\367\022\001\002\002"},
},
};
-/*
- * currently we leave module owner NULL
- */
static struct gss_api_mech gss_sk_mech = {
- .gm_owner = NULL, /*THIS_MODULE, */
+ /* .gm_owner uses default NULL value for THIS_MODULE */
.gm_name = "sk",
.gm_oid = (rawobj_t) {
- 12,
- "\053\006\001\004\001\311\146\215\126\001\000\001",
+ .len = 12,
+ .data = "\053\006\001\004\001\311\146\215\126\001\000\001",
},
.gm_ops = &gss_sk_ops,
.gm_sf_num = 4,