struct svc_cred {
kuid_t cr_uid;
kgid_t cr_gid; struct group_info *cr_group_info;
u32 cr_flavor; /* pseudoflavor */ /* name of form servicetype/hostname@REALM, passed down by
* gss-proxy: */ char *cr_raw_principal; /* name of form servicetype@hostname, passed down by
* rpc.svcgssd, or computed from the above: */ char *cr_principal; char *cr_targ_princ; struct gss_api_mech *cr_gss_mech;
};
/* Authentication is done in the context of a domain. * * Currently, the nfs server uses the auth_domain to stand * for the "client" listed in /etc/exports. * * More generally, a domain might represent a group of clients using * a common mechanism for authentication and having a common mapping * between local identity (uid) and network identity. All clients * in a domain have similar general access rights. Each domain can * contain multiple principals which will have different specific right * based on normal Discretionary Access Control. * * A domain is created by an authentication flavour module based on name * only. Userspace then fills in detail on demand. * * In the case of auth_unix and auth_null, the auth_domain is also * associated with entries in another cache representing the mapping * of ip addresses to the given client.
*/ struct auth_domain { struct kref ref; struct hlist_node hash; char *name; struct auth_ops *flavour; struct rcu_head rcu_head;
};
/* * Each authentication flavour registers an auth_ops * structure. * name is simply the name. * flavour gives the auth flavour. It determines where the flavour is registered * accept() is given a request and should verify it. * It should inspect the authenticator and verifier, and possibly the data. * If there is a problem with the authentication *authp should be set. * The return value of accept() can indicate: * OK - authorised. client and credential are set in rqstp. * reqbuf points to arguments * resbuf points to good place for results. verfier * is (probably) already in place. Certainly space is * reserved for it. * DROP - simply drop the request. It may have been deferred * CLOSE - like SVC_DROP, but request is definitely lost. * If there is a tcp connection, it should be closed. * GARBAGE - rpc garbage_args error * SYSERR - rpc system_err error * DENIED - authp holds reason for denial. * COMPLETE - the reply is encoded already and ready to be sent; no * further processing is necessary. (This is used for processing * null procedure calls which are used to set up encryption * contexts.) * * accept is passed the proc number so that it can accept NULL rpc requests * even if it cannot authenticate the client (as is sometimes appropriate). * * release() is given a request after the procedure has been run. * It should sign/encrypt the results if needed * * domain_release() * This call releases a domain. * * set_client() * Given a pending request (struct svc_rqst), finds and assigns * an appropriate 'auth_domain' as the client. * * pseudoflavor() * Returns RPC_AUTH pseudoflavor in use by @rqstp.
*/ struct auth_ops { char * name; struct module *owner; int flavour;
externint unix_gid_cache_create(struct net *net); externvoid unix_gid_cache_destroy(struct net *net);
/* * The <stringhash.h> functions are good enough that we don't need to * use hash_32() on them; just extracting the high bits is enough.
*/ staticinlineunsignedlong hash_str(charconst *name, int bits)
{ return hashlen_hash(hashlen_string(NULL, name)) >> (32 - bits);
}
staticinlineunsignedlong hash_mem(charconst *buf, int length, int bits)
{ return full_name_hash(NULL, buf, length) >> (32 - bits);
}
#endif/* _LINUX_SUNRPC_SVCAUTH_H_ */
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.