diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/include/lustre_sec.h')
-rw-r--r-- | drivers/staging/lustre/lustre/include/lustre_sec.h | 48 |
1 files changed, 2 insertions, 46 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h index 707ff69717c6..dd1033be6bfa 100644 --- a/drivers/staging/lustre/lustre/include/lustre_sec.h +++ b/drivers/staging/lustre/lustre/include/lustre_sec.h @@ -295,7 +295,6 @@ enum lustre_sec_part { LUSTRE_SP_ANY = 0xFF }; -const char *sptlrpc_part2name(enum lustre_sec_part sp); enum lustre_sec_part sptlrpc_target_sec_part(struct obd_device *obd); /** @@ -323,34 +322,19 @@ struct sptlrpc_rule_set { }; int sptlrpc_parse_flavor(const char *str, struct sptlrpc_flavor *flvr); -int sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr); +bool sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr); static inline void sptlrpc_rule_set_init(struct sptlrpc_rule_set *set) { memset(set, 0, sizeof(*set)); } -void sptlrpc_rule_set_free(struct sptlrpc_rule_set *set); -int sptlrpc_rule_set_expand(struct sptlrpc_rule_set *set); -int sptlrpc_rule_set_merge(struct sptlrpc_rule_set *set, - struct sptlrpc_rule *rule); -int sptlrpc_rule_set_choose(struct sptlrpc_rule_set *rset, - enum lustre_sec_part from, - enum lustre_sec_part to, - lnet_nid_t nid, - struct sptlrpc_flavor *sf); -void sptlrpc_rule_set_dump(struct sptlrpc_rule_set *set); - int sptlrpc_process_config(struct lustre_cfg *lcfg); void sptlrpc_conf_log_start(const char *logname); void sptlrpc_conf_log_stop(const char *logname); void sptlrpc_conf_log_update_begin(const char *logname); void sptlrpc_conf_log_update_end(const char *logname); void sptlrpc_conf_client_adapt(struct obd_device *obd); -void sptlrpc_target_choose_flavor(struct sptlrpc_rule_set *rset, - enum lustre_sec_part from, - lnet_nid_t nid, - struct sptlrpc_flavor *flavor); /* The maximum length of security payload. 1024 is enough for Kerberos 5, * and should be enough for other future mechanisms but not sure. @@ -358,7 +342,6 @@ void sptlrpc_target_choose_flavor(struct sptlrpc_rule_set *rset, */ #define SPTLRPC_MAX_PAYLOAD (1024) - struct vfs_cred { uint32_t vc_uid; uint32_t vc_gid; @@ -833,7 +816,7 @@ struct ptlrpc_sec { */ struct list_head ps_gc_list; unsigned long ps_gc_interval; /* in seconds */ - unsigned long ps_gc_next; /* in seconds */ + time64_t ps_gc_next; /* in seconds */ }; static inline int sec_is_reverse(struct ptlrpc_sec *sec) @@ -846,7 +829,6 @@ static inline int sec_is_rootonly(struct ptlrpc_sec *sec) return (sec->ps_flvr.sf_flags & PTLRPC_SEC_FL_ROOTONLY); } - struct ptlrpc_svc_ctx { atomic_t sc_refcount; struct ptlrpc_sec_policy *sc_policy; @@ -898,7 +880,6 @@ struct ptlrpc_bulk_sec_desc { __u8 bsd_data[0]; /* policy-specific token */ }; - /* * round size up to next power of 2, for slab allocation. * @size must be sane (can't overflow after round up) @@ -932,7 +913,6 @@ const char *sptlrpc_flavor2name_base(__u32 flvr); char *sptlrpc_flavor2name_bulk(struct sptlrpc_flavor *sf, char *buf, int bufsize); char *sptlrpc_flavor2name(struct sptlrpc_flavor *sf, char *buf, int bufsize); -char *sptlrpc_secflags2str(__u32 flags, char *buf, int bufsize); static inline struct ptlrpc_sec_policy *sptlrpc_policy_get(struct ptlrpc_sec_policy *policy) @@ -995,23 +975,18 @@ int cli_ctx_is_eternal(struct ptlrpc_cli_ctx *ctx) /* * sec get/put */ -struct ptlrpc_sec *sptlrpc_sec_get(struct ptlrpc_sec *sec); void sptlrpc_sec_put(struct ptlrpc_sec *sec); /* * internal apis which only used by policy implementation */ int sptlrpc_get_next_secid(void); -void sptlrpc_sec_destroy(struct ptlrpc_sec *sec); /* * exported client context api */ struct ptlrpc_cli_ctx *sptlrpc_cli_ctx_get(struct ptlrpc_cli_ctx *ctx); void sptlrpc_cli_ctx_put(struct ptlrpc_cli_ctx *ctx, int sync); -void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx); -void sptlrpc_cli_ctx_wakeup(struct ptlrpc_cli_ctx *ctx); -int sptlrpc_cli_ctx_display(struct ptlrpc_cli_ctx *ctx, char *buf, int bufsize); /* * exported client context wrap/buffers @@ -1046,15 +1021,11 @@ void sptlrpc_import_flush_all_ctx(struct obd_import *imp); int sptlrpc_req_get_ctx(struct ptlrpc_request *req); void sptlrpc_req_put_ctx(struct ptlrpc_request *req, int sync); int sptlrpc_req_refresh_ctx(struct ptlrpc_request *req, long timeout); -int sptlrpc_req_replace_dead_ctx(struct ptlrpc_request *req); void sptlrpc_req_set_flavor(struct ptlrpc_request *req, int opcode); -int sptlrpc_parse_rule(char *param, struct sptlrpc_rule *rule); - /* gc */ void sptlrpc_gc_add_sec(struct ptlrpc_sec *sec); void sptlrpc_gc_del_sec(struct ptlrpc_sec *sec); -void sptlrpc_gc_add_ctx(struct ptlrpc_cli_ctx *ctx); /* misc */ const char *sec2target_str(struct ptlrpc_sec *sec); @@ -1078,25 +1049,11 @@ int sptlrpc_svc_wrap_reply(struct ptlrpc_request *req); void sptlrpc_svc_free_rs(struct ptlrpc_reply_state *rs); void sptlrpc_svc_ctx_addref(struct ptlrpc_request *req); void sptlrpc_svc_ctx_decref(struct ptlrpc_request *req); -void sptlrpc_svc_ctx_invalidate(struct ptlrpc_request *req); int sptlrpc_target_export_check(struct obd_export *exp, struct ptlrpc_request *req); -void sptlrpc_target_update_exp_flavor(struct obd_device *obd, - struct sptlrpc_rule_set *rset); - -/* - * reverse context - */ -int sptlrpc_svc_install_rvs_ctx(struct obd_import *imp, - struct ptlrpc_svc_ctx *ctx); -int sptlrpc_cli_install_rvs_ctx(struct obd_import *imp, - struct ptlrpc_cli_ctx *ctx); /* bulk security api */ -int sptlrpc_enc_pool_add_user(void); -int sptlrpc_enc_pool_del_user(void); -int sptlrpc_enc_pool_get_pages(struct ptlrpc_bulk_desc *desc); void sptlrpc_enc_pool_put_pages(struct ptlrpc_bulk_desc *desc); int sptlrpc_cli_wrap_bulk(struct ptlrpc_request *req, @@ -1123,7 +1080,6 @@ int sptlrpc_current_user_desc_size(void); int sptlrpc_pack_user_desc(struct lustre_msg *msg, int offset); int sptlrpc_unpack_user_desc(struct lustre_msg *req, int offset, int swabbed); - #define CFS_CAP_CHOWN_MASK (1 << CFS_CAP_CHOWN) #define CFS_CAP_SYS_RESOURCE_MASK (1 << CFS_CAP_SYS_RESOURCE) |