p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/build/include/linux/sunrpc/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/build/include/linux/sunrpc/gss_api.h
/*
 * linux/include/linux/sunrpc/gss_api.h
 *
 * Somewhat simplified version of the gss api.
 *
 * Dug Song <dugsong@monkey.org>
 * Andy Adamson <andros@umich.edu>
 * Bruce Fields <bfields@umich.edu>
 * Copyright (c) 2000 The Regents of the University of Michigan
 */

#ifndef _LINUX_SUNRPC_GSS_API_H
#define _LINUX_SUNRPC_GSS_API_H

#ifdef __KERNEL__
#include <linux/sunrpc/xdr.h>
#include <linux/sunrpc/msg_prot.h>
#include <linux/uio.h>

/* The mechanism-independent gss-api context: */
struct gss_ctx {
	struct gss_api_mech	*mech_type;
	void			*internal_ctx_id;
};

#define GSS_C_NO_BUFFER		((struct xdr_netobj) 0)
#define GSS_C_NO_CONTEXT	((struct gss_ctx *) 0)
#define GSS_C_QOP_DEFAULT	(0)

/*XXX  arbitrary length - is this set somewhere? */
#define GSS_OID_MAX_LEN 32
struct rpcsec_gss_oid {
	unsigned int	len;
	u8		data[GSS_OID_MAX_LEN];
};

/* From RFC 3530 */
struct rpcsec_gss_info {
	struct rpcsec_gss_oid	oid;
	u32			qop;
	u32			service;
};

/* gss-api prototypes; note that these are somewhat simplified versions of
 * the prototypes specified in RFC 2744. */
int gss_import_sec_context(
		const void*		input_token,
		size_t			bufsize,
		struct gss_api_mech	*mech,
		struct gss_ctx		**ctx_id,
		time_t			*endtime,
		gfp_t			gfp_mask);
u32 gss_get_mic(
		struct gss_ctx		*ctx_id,
		struct xdr_buf		*message,
		struct xdr_netobj	*mic_token);
u32 gss_verify_mic(
		struct gss_ctx		*ctx_id,
		struct xdr_buf		*message,
		struct xdr_netobj	*mic_token);
u32 gss_wrap(
		struct gss_ctx		*ctx_id,
		int			offset,
		struct xdr_buf		*outbuf,
		struct page		**inpages);
u32 gss_unwrap(
		struct gss_ctx		*ctx_id,
		int			offset,
		struct xdr_buf		*inbuf);
u32 gss_delete_sec_context(
		struct gss_ctx		**ctx_id);

rpc_authflavor_t gss_svc_to_pseudoflavor(struct gss_api_mech *, u32 qop,
					u32 service);
u32 gss_pseudoflavor_to_service(struct gss_api_mech *, u32 pseudoflavor);
bool gss_pseudoflavor_to_datatouch(struct gss_api_mech *, u32 pseudoflavor);
char *gss_service_to_auth_domain_name(struct gss_api_mech *, u32 service);

struct pf_desc {
	u32	pseudoflavor;
	u32	qop;
	u32	service;
	char	*name;
	char	*auth_domain_name;
	bool	datatouch;
};

/* Different mechanisms (e.g., krb5 or spkm3) may implement gss-api, and
 * mechanisms may be dynamically registered or unregistered by modules. */

/* Each mechanism is described by the following struct: */
struct gss_api_mech {
	struct list_head	gm_list;
	struct module		*gm_owner;
	struct rpcsec_gss_oid	gm_oid;
	char			*gm_name;
	const struct gss_api_ops *gm_ops;
	/* pseudoflavors supported by this mechanism: */
	int			gm_pf_num;
	struct pf_desc *	gm_pfs;
	/* Should the following be a callback operation instead? */
	const char		*gm_upcall_enctypes;
};

/* and must provide the following operations: */
struct gss_api_ops {
	int (*gss_import_sec_context)(
			const void		*input_token,
			size_t			bufsize,
			struct gss_ctx		*ctx_id,
			time_t			*endtime,
			gfp_t			gfp_mask);
	u32 (*gss_get_mic)(
			struct gss_ctx		*ctx_id,
			struct xdr_buf		*message,
			struct xdr_netobj	*mic_token);
	u32 (*gss_verify_mic)(
			struct gss_ctx		*ctx_id,
			struct xdr_buf		*message,
			struct xdr_netobj	*mic_token);
	u32 (*gss_wrap)(
			struct gss_ctx		*ctx_id,
			int			offset,
			struct xdr_buf		*outbuf,
			struct page		**inpages);
	u32 (*gss_unwrap)(
			struct gss_ctx		*ctx_id,
			int			offset,
			struct xdr_buf		*buf);
	void (*gss_delete_sec_context)(
			void			*internal_ctx_id);
};

int gss_mech_register(struct gss_api_mech *);
void gss_mech_unregister(struct gss_api_mech *);

/* returns a mechanism descriptor given an OID, and increments the mechanism's
 * reference count. */
struct gss_api_mech * gss_mech_get_by_OID(struct rpcsec_gss_oid *);

/* Given a GSS security tuple, look up a pseudoflavor */
rpc_authflavor_t gss_mech_info2flavor(struct rpcsec_gss_info *);

/* Given a pseudoflavor, look up a GSS security tuple */
int gss_mech_flavor2info(rpc_authflavor_t, struct rpcsec_gss_info *);

/* Returns a reference to a mechanism, given a name like "krb5" etc. */
struct gss_api_mech *gss_mech_get_by_name(const char *);

/* Similar, but get by pseudoflavor. */
struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32);

/* Fill in an array with a list of supported pseudoflavors */
int gss_mech_list_pseudoflavors(rpc_authflavor_t *, int);

struct gss_api_mech * gss_mech_get(struct gss_api_mech *);

/* For every successful gss_mech_get or gss_mech_get_by_* call there must be a
 * corresponding call to gss_mech_put. */
void gss_mech_put(struct gss_api_mech *);

#endif /* __KERNEL__ */
#endif /* _LINUX_SUNRPC_GSS_API_H */

N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
January 19 2024 08:12:51
0 / 0
0755
addr.h
4.906 KB
November 06 2023 09:15:52
0 / 0
0644
auth.h
7.304 KB
November 06 2023 09:15:52
0 / 0
0644
auth_gss.h
2.268 KB
November 06 2023 09:15:52
0 / 0
0644
bc_xprt.h
2.404 KB
November 06 2023 09:15:52
0 / 0
0644
cache.h
8.499 KB
November 06 2023 09:15:52
0 / 0
0644
clnt.h
7.406 KB
November 06 2023 09:15:52
0 / 0
0644
debug.h
2.725 KB
November 06 2023 09:15:52
0 / 0
0644
gss_api.h
4.489 KB
November 06 2023 09:15:52
0 / 0
0644
gss_asn1.h
3.113 KB
November 06 2023 09:15:52
0 / 0
0644
gss_err.h
5.926 KB
November 06 2023 09:15:52
0 / 0
0644
gss_krb5.h
11.163 KB
November 06 2023 09:15:52
0 / 0
0644
gss_krb5_enctypes.h
0.12 KB
November 06 2023 09:15:52
0 / 0
0644
metrics.h
3.481 KB
November 06 2023 09:15:52
0 / 0
0644
msg_prot.h
6.196 KB
November 06 2023 09:15:52
0 / 0
0644
rpc_pipe_fs.h
3.686 KB
November 06 2023 09:15:52
0 / 0
0644
rpc_rdma.h
3.861 KB
November 06 2023 09:15:52
0 / 0
0644
sched.h
9.142 KB
November 06 2023 09:15:52
0 / 0
0644
stats.h
1.969 KB
November 06 2023 09:15:52
0 / 0
0644
svc.h
16.346 KB
November 06 2023 09:15:52
0 / 0
0644
svc_rdma.h
7.71 KB
November 06 2023 09:15:52
0 / 0
0644
svc_xprt.h
6.663 KB
November 06 2023 09:15:52
0 / 0
0644
svcauth.h
6.403 KB
November 06 2023 09:15:52
0 / 0
0644
svcauth_gss.h
0.74 KB
November 06 2023 09:15:52
0 / 0
0644
svcsock.h
2.033 KB
November 06 2023 09:15:52
0 / 0
0644
timer.h
1.106 KB
November 06 2023 09:15:52
0 / 0
0644
types.h
0.416 KB
November 06 2023 09:15:52
0 / 0
0644
xdr.h
12.849 KB
November 06 2023 09:15:52
0 / 0
0644
xprt.h
14.714 KB
November 06 2023 09:15:52
0 / 0
0644
xprtmultipath.h
1.965 KB
November 06 2023 09:15:52
0 / 0
0644
xprtrdma.h
3.028 KB
November 06 2023 09:15:52
0 / 0
0644
xprtsock.h
1.699 KB
November 06 2023 09:15:52
0 / 0
0644