亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? services.c

?? h內(nèi)核
?? C
?? 第 1 頁 / 共 3 頁
字號:
	if (rc)		goto out_unlock;	if ((p - scontext2) < scontext_len) {		rc = -EINVAL;		goto out_unlock;	}	/* Check the validity of the new context. */	if (!policydb_context_isvalid(&policydb, &context)) {		rc = -EINVAL;		goto out_unlock;	}	/* Obtain the new sid. */	rc = sidtab_context_to_sid(&sidtab, &context, sid);out_unlock:	POLICY_RDUNLOCK;	context_destroy(&context);	kfree(scontext2);out:	return rc;}static int compute_sid_handle_invalid_context(	struct context *scontext,	struct context *tcontext,	u16 tclass,	struct context *newcontext){	char *s = NULL, *t = NULL, *n = NULL;	u32 slen, tlen, nlen;	if (context_struct_to_string(scontext, &s, &slen) < 0)		goto out;	if (context_struct_to_string(tcontext, &t, &tlen) < 0)		goto out;	if (context_struct_to_string(newcontext, &n, &nlen) < 0)		goto out;	audit_log(current->audit_context,		  "security_compute_sid:  invalid context %s"		  " for scontext=%s"		  " tcontext=%s"		  " tclass=%s",		  n, s, t, policydb.p_class_val_to_name[tclass-1]);out:	kfree(s);	kfree(t);	kfree(n);	if (!selinux_enforcing)		return 0;	return -EACCES;}static int security_compute_sid(u32 ssid,				u32 tsid,				u16 tclass,				u32 specified,				u32 *out_sid){	struct context *scontext = NULL, *tcontext = NULL, newcontext;	struct role_trans *roletr = NULL;	struct avtab_key avkey;	struct avtab_datum *avdatum;	struct avtab_node *node;	unsigned int type_change = 0;	int rc = 0;	if (!ss_initialized) {		switch (tclass) {		case SECCLASS_PROCESS:			*out_sid = ssid;			break;		default:			*out_sid = tsid;			break;		}		goto out;	}	POLICY_RDLOCK;	scontext = sidtab_search(&sidtab, ssid);	if (!scontext) {		printk(KERN_ERR "security_compute_sid:  unrecognized SID %d\n",		       ssid);		rc = -EINVAL;		goto out_unlock;	}	tcontext = sidtab_search(&sidtab, tsid);	if (!tcontext) {		printk(KERN_ERR "security_compute_sid:  unrecognized SID %d\n",		       tsid);		rc = -EINVAL;		goto out_unlock;	}	context_init(&newcontext);	/* Set the user identity. */	switch (specified) {	case AVTAB_TRANSITION:	case AVTAB_CHANGE:		/* Use the process user identity. */		newcontext.user = scontext->user;		break;	case AVTAB_MEMBER:		/* Use the related object owner. */		newcontext.user = tcontext->user;		break;	}	/* Set the role and type to default values. */	switch (tclass) {	case SECCLASS_PROCESS:		/* Use the current role and type of process. */		newcontext.role = scontext->role;		newcontext.type = scontext->type;		break;	default:		/* Use the well-defined object role. */		newcontext.role = OBJECT_R_VAL;		/* Use the type of the related object. */		newcontext.type = tcontext->type;	}	/* Look for a type transition/member/change rule. */	avkey.source_type = scontext->type;	avkey.target_type = tcontext->type;	avkey.target_class = tclass;	avdatum = avtab_search(&policydb.te_avtab, &avkey, AVTAB_TYPE);	/* If no permanent rule, also check for enabled conditional rules */	if(!avdatum) {		node = avtab_search_node(&policydb.te_cond_avtab, &avkey, specified);		for (; node != NULL; node = avtab_search_node_next(node, specified)) {			if (node->datum.specified & AVTAB_ENABLED) {				avdatum = &node->datum;				break;			}		}	}	type_change = (avdatum && (avdatum->specified & specified));	if (type_change) {		/* Use the type from the type transition/member/change rule. */		switch (specified) {		case AVTAB_TRANSITION:			newcontext.type = avtab_transition(avdatum);			break;		case AVTAB_MEMBER:			newcontext.type = avtab_member(avdatum);			break;		case AVTAB_CHANGE:			newcontext.type = avtab_change(avdatum);			break;		}	}	/* Check for class-specific changes. */	switch (tclass) {	case SECCLASS_PROCESS:		if (specified & AVTAB_TRANSITION) {			/* Look for a role transition rule. */			for (roletr = policydb.role_tr; roletr;			     roletr = roletr->next) {				if (roletr->role == scontext->role &&				    roletr->type == tcontext->type) {					/* Use the role transition rule. */					newcontext.role = roletr->new_role;					break;				}			}		}		if (!type_change && !roletr) {			/* No change in process role or type. */			*out_sid = ssid;			goto out_unlock;		}		break;	default:		if (!type_change &&		    (newcontext.user == tcontext->user) &&		    mls_context_cmp(scontext, tcontext)) {                        /* No change in object type, owner,			   or MLS attributes. */			*out_sid = tsid;			goto out_unlock;		}		break;	}	/* Set the MLS attributes.	   This is done last because it may allocate memory. */	rc = mls_compute_sid(scontext, tcontext, tclass, specified, &newcontext);	if (rc)		goto out_unlock;	/* Check the validity of the context. */	if (!policydb_context_isvalid(&policydb, &newcontext)) {		rc = compute_sid_handle_invalid_context(scontext,							tcontext,							tclass,							&newcontext);		if (rc)			goto out_unlock;	}	/* Obtain the sid for the context. */	rc = sidtab_context_to_sid(&sidtab, &newcontext, out_sid);out_unlock:	POLICY_RDUNLOCK;	context_destroy(&newcontext);out:	return rc;}/** * security_transition_sid - Compute the SID for a new subject/object. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @out_sid: security identifier for new subject/object * * Compute a SID to use for labeling a new subject or object in the * class @tclass based on a SID pair (@ssid, @tsid). * Return -%EINVAL if any of the parameters are invalid, -%ENOMEM * if insufficient memory is available, or %0 if the new SID was * computed successfully. */int security_transition_sid(u32 ssid,			    u32 tsid,			    u16 tclass,			    u32 *out_sid){	return security_compute_sid(ssid, tsid, tclass, AVTAB_TRANSITION, out_sid);}/** * security_member_sid - Compute the SID for member selection. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @out_sid: security identifier for selected member * * Compute a SID to use when selecting a member of a polyinstantiated * object of class @tclass based on a SID pair (@ssid, @tsid). * Return -%EINVAL if any of the parameters are invalid, -%ENOMEM * if insufficient memory is available, or %0 if the SID was * computed successfully. */int security_member_sid(u32 ssid,			u32 tsid,			u16 tclass,			u32 *out_sid){	return security_compute_sid(ssid, tsid, tclass, AVTAB_MEMBER, out_sid);}/** * security_change_sid - Compute the SID for object relabeling. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @out_sid: security identifier for selected member * * Compute a SID to use for relabeling an object of class @tclass * based on a SID pair (@ssid, @tsid). * Return -%EINVAL if any of the parameters are invalid, -%ENOMEM * if insufficient memory is available, or %0 if the SID was * computed successfully. */int security_change_sid(u32 ssid,			u32 tsid,			u16 tclass,			u32 *out_sid){	return security_compute_sid(ssid, tsid, tclass, AVTAB_CHANGE, out_sid);}/* * Verify that each permission that is defined under the * existing policy is still defined with the same value * in the new policy. */static int validate_perm(void *key, void *datum, void *p){	struct hashtab *h;	struct perm_datum *perdatum, *perdatum2;	int rc = 0;	h = p;	perdatum = datum;	perdatum2 = hashtab_search(h, key);	if (!perdatum2) {		printk(KERN_ERR "security:  permission %s disappeared",		       (char *)key);		rc = -ENOENT;		goto out;	}	if (perdatum->value != perdatum2->value) {		printk(KERN_ERR "security:  the value of permission %s changed",		       (char *)key);		rc = -EINVAL;	}out:	return rc;}/* * Verify that each class that is defined under the * existing policy is still defined with the same * attributes in the new policy. */static int validate_class(void *key, void *datum, void *p){	struct policydb *newp;	struct class_datum *cladatum, *cladatum2;	int rc;	newp = p;	cladatum = datum;	cladatum2 = hashtab_search(newp->p_classes.table, key);	if (!cladatum2) {		printk(KERN_ERR "security:  class %s disappeared\n",		       (char *)key);		rc = -ENOENT;		goto out;	}	if (cladatum->value != cladatum2->value) {		printk(KERN_ERR "security:  the value of class %s changed\n",		       (char *)key);		rc = -EINVAL;		goto out;	}	if ((cladatum->comdatum && !cladatum2->comdatum) ||	    (!cladatum->comdatum && cladatum2->comdatum)) {		printk(KERN_ERR "security:  the inherits clause for the access "		       "vector definition for class %s changed\n", (char *)key);		rc = -EINVAL;		goto out;	}	if (cladatum->comdatum) {		rc = hashtab_map(cladatum->comdatum->permissions.table, validate_perm,		                 cladatum2->comdatum->permissions.table);		if (rc) {			printk(" in the access vector definition for class "			       "%s\n", (char *)key);			goto out;		}	}	rc = hashtab_map(cladatum->permissions.table, validate_perm,	                 cladatum2->permissions.table);	if (rc)		printk(" in access vector definition for class %s\n",		       (char *)key);out:	return rc;}/* Clone the SID into the new SID table. */static int clone_sid(u32 sid,		     struct context *context,		     void *arg){	struct sidtab *s = arg;	return sidtab_insert(s, sid, context);}static inline int convert_context_handle_invalid_context(struct context *context){	int rc = 0;	if (selinux_enforcing) {		rc = -EINVAL;	} else {		char *s;		u32 len;		context_struct_to_string(context, &s, &len);		printk(KERN_ERR "security:  context %s is invalid\n", s);		kfree(s);	}	return rc;}struct convert_context_args {	struct policydb *oldp;	struct policydb *newp;};/* * Convert the values in the security context * structure `c' from the values specified * in the policy `p->oldp' to the values specified * in the policy `p->newp'.  Verify that the * context is valid under the new policy. */static int convert_context(u32 key,			   struct context *c,			   void *p){	struct convert_context_args *args;	struct context oldc;	struct role_datum *role;	struct type_datum *typdatum;	struct user_datum *usrdatum;	char *s;	u32 len;	int rc;	args = p;	rc = context_cpy(&oldc, c);	if (rc)		goto out;	rc = -EINVAL;	/* Convert the user. */	usrdatum = hashtab_search(args->newp->p_users.table,	                          args->oldp->p_user_val_to_name[c->user - 1]);	if (!usrdatum) {		goto bad;	}	c->user = usrdatum->value;	/* Convert the role. */	role = hashtab_search(args->newp->p_roles.table,	                      args->oldp->p_role_val_to_name[c->role - 1]);	if (!role) {		goto bad;	}	c->role = role->value;	/* Convert the type. */	typdatum = hashtab_search(args->newp->p_types.table,	                          args->oldp->p_type_val_to_name[c->type - 1]);	if (!typdatum) {		goto bad;	}	c->type = typdatum->value;	rc = mls_convert_context(args->oldp, args->newp, c);	if (rc)		goto bad;	/* Check the validity of the new context. */	if (!policydb_context_isvalid(args->newp, c)) {		rc = convert_context_handle_invalid_context(&oldc);		if (rc)			goto bad;	}	context_destroy(&oldc);out:	return rc;bad:	context_struct_to_string(&oldc, &s, &len);	context_destroy(&oldc);	printk(KERN_ERR "security:  invalidating context %s\n", s);	kfree(s);	goto out;}extern void selinux_complete_init(void);/** * security_load_policy - Load a security policy configuration. * @data: binary policy data * @len: length of data in bytes * * Load a new set of security policy configuration data, * validate it and convert the SID table as necessary. * This function will flush the access vector cache after * loading the new policy. */int security_load_policy(void *data, size_t len){	struct policydb oldpolicydb, newpolicydb;	struct sidtab oldsidtab, newsidtab;	struct convert_context_args args;	u32 seqno;	int rc = 0;	struct policy_file file = { data, len }, *fp = &file;	LOAD_LOCK;	if (!ss_initialized) {		avtab_cache_init();		if (policydb_read(&policydb, fp)) {			LOAD_UNLOCK;			avtab_cache_destroy();			return -EINVAL;		}		if (policydb_load_isids(&policydb, &sidtab)) {			LOAD_UNLOCK;			policydb_destroy(&policydb);			avtab_cache_destroy();			return -EINVAL;		}		policydb_loaded_version = policydb.policyvers;		ss_initialized = 1;		LOAD_UNLOCK;		selinux_complete_init();		return 0;	}#if 0	sidtab_hash_eval(&sidtab, "sids");#endif	if (policydb_read(&newpolicydb, fp)) {		LOAD_UNLOCK;		return -EINVAL;	}	sidtab_init(&newsidtab);	/* Verify that the existing classes did not change. */	if (hashtab_map(policydb.p_classes.table, validate_class, &newpolicydb)) {		printk(KERN_ERR "security:  the definition of an existing "		       "class changed\n");		rc = -EINVAL;		goto err;	}	/* Clone the SID table. */	sidtab_shutdown(&sidtab);	if (sidtab_map(&sidtab, clone_sid, &newsidtab)) {		rc = -ENOMEM;		goto err;	}	/* Convert the internal representations of contexts	   in the new SID table and remove invalid SIDs. */	args.oldp = &policydb;	args.newp = &newpolicydb;	sidtab_map_remove_on_error(&newsidtab, convert_context, &args);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品免费视频人成| 91色在线porny| 91免费观看视频| 精品区一区二区| 亚洲男人的天堂在线aⅴ视频| 免费成人你懂的| 一本到三区不卡视频| 久久综合一区二区| 三级欧美在线一区| 色域天天综合网| 国产精品天天看| 久久精品免费看| 欧美日韩视频专区在线播放| 中文字幕一区二区视频| 韩国精品免费视频| 日韩一区二区电影网| 亚洲国产精品久久久男人的天堂 | 日本乱人伦aⅴ精品| 久久久国产精品午夜一区ai换脸| 日韩国产精品久久久| 欧美日韩dvd在线观看| 亚洲免费观看高清| 91麻豆swag| 亚洲色图欧洲色图婷婷| 不卡在线视频中文字幕| 欧美极品少妇xxxxⅹ高跟鞋 | 亚洲国产精品99久久久久久久久| 日韩不卡手机在线v区| 欧美精品丝袜中出| 亚洲国产成人av网| 欧美日韩精品二区第二页| 亚洲综合在线观看视频| 日本伦理一区二区| 亚洲国产日日夜夜| 欧美日韩大陆一区二区| 亚洲va欧美va人人爽午夜| 欧美精品一卡两卡| 男男视频亚洲欧美| 久久久久久日产精品| 国产盗摄一区二区| 国产精品女主播av| 91啦中文在线观看| 亚洲国产精品自拍| 91精品啪在线观看国产60岁| 日本特黄久久久高潮| 日韩美女一区二区三区四区| 麻豆成人av在线| 久久青草欧美一区二区三区| 成人永久免费视频| 一区二区三区在线免费观看 | 亚洲午夜久久久久久久久久久| 日本韩国一区二区三区视频| av午夜精品一区二区三区| 欧美经典三级视频一区二区三区| 99视频一区二区| 亚洲图片欧美色图| 日韩欧美一二三四区| 成人性视频网站| 亚洲激情在线播放| 91精品欧美一区二区三区综合在| 国产精品亚洲午夜一区二区三区| 国产欧美日韩在线观看| 日本电影欧美片| 毛片av一区二区| 国产精品久久久久久久久动漫| 91老师片黄在线观看| 六月丁香婷婷久久| 亚洲激情自拍偷拍| 久久婷婷色综合| 欧美最猛黑人xxxxx猛交| 蜜桃视频一区二区| 亚洲男女毛片无遮挡| 欧美一区二区三区四区高清 | 国产精品久久久久久亚洲毛片 | 日韩二区三区四区| 日本一区二区综合亚洲| 欧美四级电影在线观看| 国产精品主播直播| 亚洲成人av福利| 中文字幕欧美激情| 日韩欧美中文字幕公布| 欧美图区在线视频| 不卡区在线中文字幕| 蜜桃av一区二区三区电影| 亚洲视频免费观看| xnxx国产精品| 欧美人伦禁忌dvd放荡欲情| www.在线欧美| 精品一区二区三区影院在线午夜 | 最新久久zyz资源站| 日韩欧美国产一区在线观看| 在线观看免费一区| 成人免费毛片a| 国产老女人精品毛片久久| 亚洲成人激情自拍| 亚洲裸体在线观看| 国产精品乱人伦中文| 欧美精品一区二区三区高清aⅴ| 色屁屁一区二区| av资源站一区| 粗大黑人巨茎大战欧美成人| 另类欧美日韩国产在线| 丝袜诱惑亚洲看片| 亚洲成人精品一区| 亚洲国产精品一区二区尤物区| 亚洲天堂福利av| 国产精品另类一区| 中文字幕巨乱亚洲| 久久久国产一区二区三区四区小说 | 久久久国产综合精品女国产盗摄| 91精品啪在线观看国产60岁| 欧美另类videos死尸| 欧美色欧美亚洲另类二区| 色老综合老女人久久久| 色诱视频网站一区| 一本色道久久综合狠狠躁的推荐| 99精品国产一区二区三区不卡| 国产精品资源在线看| 国产精品资源网站| 成人黄色av电影| 色综合 综合色| 欧美性受xxxx| 欧美日韩精品一区视频| 91麻豆精品久久久久蜜臀| 日韩欧美一二三区| 久久久美女艺术照精彩视频福利播放| 久久综合狠狠综合久久综合88| 精品国产乱码久久久久久闺蜜| 久久综合久久综合亚洲| 国产日韩欧美精品在线| 国产精品免费丝袜| 亚洲欧美经典视频| 亚洲第一搞黄网站| 久久精品国产网站| 国产福利一区二区| 色综合久久综合| 欧美一区在线视频| 国产精品网站在线观看| 亚洲最大的成人av| 日韩成人精品在线观看| 国产主播一区二区三区| 99热99精品| 7777精品伊人久久久大香线蕉最新版 | 精品免费国产一区二区三区四区| 精品国产凹凸成av人网站| 欧美激情自拍偷拍| 亚洲一区二区三区四区五区中文| 天堂va蜜桃一区二区三区漫画版| 国产美女视频91| 色先锋久久av资源部| 日韩一二在线观看| 国产精品天美传媒沈樵| 亚洲444eee在线观看| 国产成人在线视频网址| 欧美视频三区在线播放| 久久影院视频免费| 亚洲国产日产av| 国产裸体歌舞团一区二区| 一本久道久久综合中文字幕| 日韩欧美一区二区视频| 亚洲欧美日韩小说| 激情深爱一区二区| 在线观看av一区二区| 久久精品视频一区二区| 天天操天天干天天综合网| 成人小视频在线| 日韩三级在线观看| 一区二区欧美国产| 国产999精品久久久久久| 在线播放/欧美激情| 综合欧美一区二区三区| 久久精品国产亚洲一区二区三区| 日本高清免费不卡视频| 中文字幕国产一区| 男男成人高潮片免费网站| 91成人免费在线视频| 久久精品欧美一区二区三区不卡| 亚洲成人av福利| 色88888久久久久久影院按摩| 久久久五月婷婷| 日本不卡一二三| 欧美日韩成人综合天天影院| 亚洲伦在线观看| 99精品欧美一区二区三区小说| 久久在线免费观看| 美女任你摸久久| 欧美一区二区三区播放老司机| 怡红院av一区二区三区| av在线不卡观看免费观看| 久久久久久夜精品精品免费| 老色鬼精品视频在线观看播放| 69精品人人人人| 亚洲成人在线网站| 欧美日韩黄色影视| 午夜视频在线观看一区| 欧美日韩中文字幕精品| 一区二区不卡在线视频 午夜欧美不卡在| 成a人片亚洲日本久久| **网站欧美大片在线观看| av不卡免费在线观看|